#!/bin/bash
### BEGIN INIT INFO
# Provides: python
# Required-Start:
# Required-Stop:
# Default-Start: 2 3 4 5
# Default-Stop:
# Short-Description: This is for Twitter
# Description: This is for Twitter
### END INIT INFO
PATH=/bin:/sbin:/usr/sbin:/bin:/usr/bin
case $1 in
start)
cd /home/david/
start-stop-deamon --start --exec python3 twitterimage.py
;;
stop)
pkill python3
;;
restart|reload|*)
pkill python3
cd /home/david/
start-stop-deamon --start --exec python3 twitterimage.py
;;
esac