check Shadowsocks running or not
This commit is contained in:
parent
656e26a0c1
commit
17597fae94
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user