mirror of
https://github.com/kenzok8/small-package
synced 2025-01-07 07:06:58 +08:00
update 2022-08-09 20:22:33
This commit is contained in:
parent
6dae1322e6
commit
15f643fb49
@ -241,7 +241,7 @@ stop() {
|
||||
sed -i '/l2tp-server/d' ${CHAP_SECRETS} 2>/dev/null
|
||||
top -bn1 | grep "${L2TP_PATH}" | grep -v "grep" | awk '{print $1}' | xargs kill -9 >/dev/null 2>&1
|
||||
rm -rf ${L2TP_PATH}
|
||||
ps -w | grep "/usr/lib/ipsec" | grep -v "grep" | awk '{print $1}' | xargs kill -9 >/dev/null 2>&1
|
||||
busybox ps -w | grep "/usr/lib/ipsec" | grep -v "grep" | awk '{print $1}' | xargs kill -9 >/dev/null 2>&1
|
||||
ipt_rule del
|
||||
rm -rf /var/etc/ipsecvpn.include
|
||||
ln -s "libipsec.so.0.0.0" "/usr/lib/ipsec/libipsec.so.0" >/dev/null 2>&1
|
||||
|
@ -25,8 +25,8 @@ end
|
||||
|
||||
function act_status()
|
||||
local e = {}
|
||||
e.nginx_status = luci.sys.call("ps -w | grep nginx | grep kodexplorer | grep -v grep > /dev/null") == 0
|
||||
e.php_status = luci.sys.call("ps -w | grep php | grep kodexplorer | grep -v grep > /dev/null") == 0
|
||||
e.nginx_status = luci.sys.call("busybox ps -w | grep nginx | grep kodexplorer | grep -v grep > /dev/null") == 0
|
||||
e.php_status = luci.sys.call("busybox ps -w | grep php | grep kodexplorer | grep -v grep > /dev/null") == 0
|
||||
http_write_json(e)
|
||||
end
|
||||
|
||||
|
@ -11,7 +11,7 @@ end
|
||||
|
||||
function act_status()
|
||||
local e = {}
|
||||
e.status = luci.sys.call("ps -w | grep pingos | grep nginx | grep -v grep > /dev/null") == 0
|
||||
e.status = luci.sys.call("busybox ps -w | grep pingos | grep nginx | grep -v grep > /dev/null") == 0
|
||||
luci.http.prepare_content("application/json")
|
||||
luci.http.write_json(e)
|
||||
end
|
||||
|
@ -15,7 +15,7 @@ end
|
||||
function act_status()
|
||||
local e = {}
|
||||
e.index = luci.http.formvalue("index")
|
||||
e.status = luci.sys.call(string.format("ps -w | grep -v 'grep' | grep '/var/etc/socat/%s' >/dev/null", luci.http.formvalue("id"))) == 0
|
||||
e.status = luci.sys.call(string.format("busybox ps -w | grep -v 'grep' | grep '/var/etc/socat/%s' >/dev/null", luci.http.formvalue("id"))) == 0
|
||||
luci.http.prepare_content("application/json")
|
||||
luci.http.write_json(e)
|
||||
end
|
||||
|
@ -91,7 +91,7 @@ run_service() {
|
||||
}
|
||||
|
||||
stop_service() {
|
||||
ps -w | grep "$CONFIG_PATH/" | grep -v "grep" | awk '{print $1}' | xargs kill -9 >/dev/null 2>&1 &
|
||||
busybox ps -w | grep "$CONFIG_PATH/" | grep -v "grep" | awk '{print $1}' | xargs kill -9 >/dev/null 2>&1 &
|
||||
del_rule
|
||||
rm -rf $CONFIG_PATH /var/etc/$CONFIG.include
|
||||
}
|
||||
|
@ -39,7 +39,7 @@ end
|
||||
|
||||
function status()
|
||||
local e = {}
|
||||
e.status = luci.sys.call("ps -w | grep -v grep | grep '/usr/share/ssr_mudb_server/server.py' >/dev/null") == 0
|
||||
e.status = luci.sys.call("busybox ps -w | grep -v grep | grep '/usr/share/ssr_mudb_server/server.py' >/dev/null") == 0
|
||||
http_write_json(e)
|
||||
end
|
||||
|
||||
|
@ -77,7 +77,7 @@ start_ssr_python_server() {
|
||||
}
|
||||
|
||||
stop_ssr_python_server() {
|
||||
ps -w | grep "$ssr_path/server.py" | grep -v "grep" | awk '{print $1}' | xargs kill -9 >/dev/null 2>&1 &
|
||||
busybox ps -w | grep "$ssr_path/server.py" | grep -v "grep" | awk '{print $1}' | xargs kill -9 >/dev/null 2>&1 &
|
||||
set_ssr_python_crontab 0
|
||||
del_rule
|
||||
rm -rf /var/log/$CONFIG.log /var/etc/$CONFIG.include
|
||||
|
Loading…
Reference in New Issue
Block a user