[modify] remove calibre & jekyll things to old/, and change the name and content of shutdown.sh
This commit is contained in:
@ -1,19 +0,0 @@
|
||||
#!/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"
|
||||
|
@ -1,38 +0,0 @@
|
||||
#!/bin/bash
|
||||
|
||||
function bash_update() {
|
||||
echo $directory$filename $action
|
||||
rm -rf /opt/websites/just-the-docs/bash
|
||||
jekyll b -s /opt/apps/document/bash -d /opt/websites/just-the-docs/bash
|
||||
}
|
||||
|
||||
function python_update() {
|
||||
echo $directory$filename $action
|
||||
rm -rf /opt/websites/just-the-docs/python
|
||||
jekyll b -s /opt/apps/document/python -d /opt/websites/just-the-docs/python
|
||||
}
|
||||
|
||||
|
||||
function blog_update() {
|
||||
echo $directory$filename $action
|
||||
rm -rf /opt/websites/blog
|
||||
jekyll b -s /opt/apps/blog/ -d /opt/websites/blog/
|
||||
echo -e '\n'
|
||||
}
|
||||
|
||||
|
||||
echo -e '\n\n==================================================================' >> /opt/logs/jekyll_update.log
|
||||
date >> /opt/logs/jekyll_update.log
|
||||
if [[ $1 == 'blog' ]]; then
|
||||
blog_update >> /opt/logs/jekyll_update.log
|
||||
elif [[ $1 == 'python' ]]; then
|
||||
python_update >> /opt/logs/jekyll_update.log
|
||||
elif [[ $1 == 'bash' ]]; then
|
||||
bash_update >> /opt/logs/jekyll_update.log
|
||||
else
|
||||
echo Wrong >> /opt/logs/jekyll_update.log
|
||||
exit 2
|
||||
fi
|
||||
|
||||
|
||||
|
@ -1,12 +0,0 @@
|
||||
#!/bin/bash
|
||||
|
||||
inotify-hookable \
|
||||
--watch-directories /opt/apps/blog \
|
||||
--watch-directories /opt/apps/document/python \
|
||||
--watch-directories /opt/apps/document/bash \
|
||||
--ignore-paths /opt/apps/blog/.git/ \
|
||||
--ignore-paths /opt/apps/blog/img/avatar.jpg \
|
||||
--on-modify-path-command "(^/opt/apps/blog/.*)=(bash /opt/scripts/update/jekyll_content_update.sh blog)" \
|
||||
--on-modify-path-command "(^/opt/apps/document/python/.*)=(bash /opt/scripts/update/jekyll_content_update.sh python)" \
|
||||
--on-modify-path-command "(^/opt/apps/document/bash/.*)=(bash /opt/scripts/update/jekyll_content_update.sh 'bash')"
|
||||
|
Reference in New Issue
Block a user