[modify] rewrite backups.sh, add dash logo change, and change the start program of calibre

This commit is contained in:
2023-06-08 10:02:29 +08:00
parent 66b1dd4d70
commit 3956206c45
3 changed files with 6 additions and 6 deletions

View File

@ -1,7 +1,8 @@
#!/bin/bash
calibre='/opt/apps/calibre/calibre-web-0.6.20'
# get the pid of calibre, and write it into file /tmp/calibre_pids
ps -ef | grep '/opt/apps/calibre/venv/bin/cps' | grep -v grep | awk '{print $2}' > /tmp/calibre_pids
ps -ef | grep "$calibre/cps.py" | grep -v grep | awk '{print $2}' > /tmp/calibre_pids
# if not exist, signifying that there is no calibre process
if [[ ! -s /tmp/calibre_pids ]]; then
@ -12,6 +13,6 @@ else
done
fi
nohup /opt/apps/calibre/venv/bin/python /opt/apps/calibre/venv/bin/cps > /dev/null 2>&1 &
nohup $calibre/venv/bin/python $calibre/cps.py > /dev/null 2>&1 &
echo -e "\e[1;32mCalibre process started successfully\e[0m"