wikilibras-taskmgr 614 Bytes
#!/bin/sh
### BEGIN INIT INFO
# Provides:          wikilibras-taskmgr
# Required-Start:    $all
# Required-Stop:     $all
# Default-Start:     2 3 4 5
# Default-Stop:      0 1 6
# Short-Description: This service update tasks for Wikilibras
# Description: Enable service provided by Wikilibras API at boot
### END INIT INFO

export PATH=$PATH:/usr/local/bin

case "$1" in
    start)
        cd "<path-to-project>"
	    . env/bin/activate
	    python main.py &
    ;;
    stop)
        killall python
    ;;
    *)
        echo "Usage: /etc/init.d/wikilibras-taskmgr {start|stop}"
        exit 1
    ;;
esac

exit 0