check Shadowsocks running or not

This commit is contained in:
Teddysun 2015-10-15 15:54:26 +08:00
parent 656e26a0c1
commit 17597fae94

View File

@ -7,6 +7,8 @@
name=Shadowsocks
# log path
path=/var/log
# check log path
[[ ! -d $path ]] && mkdir -p $path
# log file
log=$path/shadowsocks-crond.log
# shadowsocks-python bin path(centos)
@ -35,11 +37,6 @@ if [ $? -eq 0 ]; then
fi
fi
# check log path
if [ ! -d $path ]; then
mkdir -p $path
fi
# check status & auto start
if [[ -z $pid ]]; then
echo "`date +"%Y-%m-%d %H:%M:%S"` $name is not running" >> $log