linux - init.d autostart python script after reboot (Centos) -


has 1 script autostart python script after reboot (centos).

i tryed code, not working

#! /bin/sh # chkconfig: 2345 95 20 # description: almagest # script (not sure if necessary though) # processname: www-almagest # /etc/init.d/www-almagest start  case "$1" in   start)     echo "starting almagest"     # run application want start     python ~almagest_clinic/app.py &> /dev/null &     ;;   stop)     echo "stopping example"     # kill application want stop     kill -9 $(sudo lsof -t -i:8002)     ;;   *)     echo "usage: /etc/init.d/www-private{start|stop}"     exit 1     ;; esac  exit 0 

chkconfig script on

i found solution https://github.com/frdmn/service-daemons/blob/master/centos absolute path worked me


Comments

Popular posts from this blog

Android layout hidden on keyboard show -

google app engine - 403 Forbidden POST - Flask WTForms -

c - Why would PK11_GenerateRandom() return an error -8023? -