From 604f75afc8576b39cfb89602b29f3d6def0bd9c9 Mon Sep 17 00:00:00 2001 From: gashapwn Date: Sat, 5 Dec 2020 22:26:03 +0000 Subject: [PATCH] lingyin.rc - now uses lyctl.sh to start --- perl-script/conf/lingyin.rc | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/perl-script/conf/lingyin.rc b/perl-script/conf/lingyin.rc index b2c0c08..d62f014 100644 --- a/perl-script/conf/lingyin.rc +++ b/perl-script/conf/lingyin.rc @@ -2,14 +2,24 @@ # # lingyind -daemon="cd /tilde/lyadmin/ && . /tilde/lyadmin/venv/bin/activate && python3 /tilde/lyadmin/app.py &" +#daemon="cd /tilde/lyadmin/ && . /tilde/lyadmin/venv/bin/activate && python3 /tilde/lyadmin/app.py &" +daemon="/tilde/lyadmin/perl-script/conf/lyctl.sh" daemon_user="_lingyind" . /etc/rc.d/rc.subr -pexp="python3 /tilde/lyadmin/app.py" +#pexp="python3 /tilde/lyadmin/app.py" +pexp="/tilde/lyadmin/venv/bin/python3 /tilde/lyadmin/app.py" rc_reload=NO +rc_start() { + ${daemon} start +} + +rc_check(){ + pgrep -f "^${pexp}" > /dev/null +} + rc_stop() { pkill -f "^${pexp}" }