check Shadowsocks running or not
This commit is contained in:
parent
656e26a0c1
commit
17597fae94
|
|
@ -7,6 +7,8 @@
|
||||||
name=Shadowsocks
|
name=Shadowsocks
|
||||||
# log path
|
# log path
|
||||||
path=/var/log
|
path=/var/log
|
||||||
|
# check log path
|
||||||
|
[[ ! -d $path ]] && mkdir -p $path
|
||||||
# log file
|
# log file
|
||||||
log=$path/shadowsocks-crond.log
|
log=$path/shadowsocks-crond.log
|
||||||
# shadowsocks-python bin path(centos)
|
# shadowsocks-python bin path(centos)
|
||||||
|
|
@ -35,11 +37,6 @@ if [ $? -eq 0 ]; then
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# check log path
|
|
||||||
if [ ! -d $path ]; then
|
|
||||||
mkdir -p $path
|
|
||||||
fi
|
|
||||||
|
|
||||||
# check status & auto start
|
# check status & auto start
|
||||||
if [[ -z $pid ]]; then
|
if [[ -z $pid ]]; then
|
||||||
echo "`date +"%Y-%m-%d %H:%M:%S"` $name is not running" >> $log
|
echo "`date +"%Y-%m-%d %H:%M:%S"` $name is not running" >> $log
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue
Block a user