[modify] rewrite backups.sh, add dash logo change, and change the start program of calibre
This commit is contained in:
@ -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"
|
||||
|
||||
|
Reference in New Issue
Block a user