[modify] remove calibre & jekyll things to old/, and change the name and content of shutdown.sh

This commit is contained in:
2023-09-08 16:50:12 +08:00
parent 9b97d42f31
commit 20813a992f
4 changed files with 0 additions and 0 deletions

19
old/calibre.sh Normal file
View File

@ -0,0 +1,19 @@
#!/bin/bash
calibre='/opt/apps/calibre/calibre-web-0.6.20'
cd $calibre
# get the pid of calibre, and write it into file calibre_pids
ps -ef | grep "$calibre/cps.py" | grep -v grep | awk '{print $2}' > calibre_pids
# if not exist, signifying that there is no calibre process
if [[ ! -s calibre_pids ]]; then
echo -e "\e[1;31mCannot terminate Calibre process cause there is no such things, will run calibre later automatically.\e[0m"
else
for calibre_pid in `cat calibre_pids`; do
kill -9 $calibre_pid > /dev/null 2>&1
done
fi
nohup $calibre/venv/bin/python $calibre/cps.py > /dev/null 2>&1 &
echo -e "\e[1;32mCalibre process started successfully\e[0m"