scripts and tools to administer the lingy.in public unix / tilde
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

28 line
470B

  1. #!/bin/ksh
  2. #
  3. # lingyind
  4. #daemon="cd /tilde/lyadmin/ && . /tilde/lyadmin/venv/bin/activate && python3 /tilde/lyadmin/app.py &"
  5. daemon="/tilde/lyadmin/perl-script/conf/lyctl.sh"
  6. daemon_user="_lingyind"
  7. . /etc/rc.d/rc.subr
  8. #pexp="python3 /tilde/lyadmin/app.py"
  9. pexp="/tilde/lyadmin/venv/bin/python3 /tilde/lyadmin/app.py"
  10. rc_reload=NO
  11. rc_start() {
  12. ${daemon} start
  13. }
  14. rc_check(){
  15. pgrep -f "^${pexp}" > /dev/null
  16. }
  17. rc_stop() {
  18. pkill -f "^${pexp}"
  19. }
  20. rc_cmd $1