Advertisement
ArranUbels

Tiny Tiny RSS start script

Apr 13th, 2013
440
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.30 KB | None | 0 0
  1. #! /bin/sh
  2. ### BEGIN INIT INFO
  3. # Provides: tinytinyrss
  4. # Required-Start: $syslog $time $remote_fs
  5. # Required-Stop: $syslog $time $remote_fs
  6. # Default-Start: 2 3 4 5
  7. # Default-Stop: 0 1 6
  8. # Short-Description: Tiny Tiny Rss
  9. # Description: Debian init script for the Tiny Tiny RSS update
  10. # scheduler
  11. ### END INIT INFO
  12. #
  13.  
  14. PATH=/bin:/usr/bin:/sbin:/usr/sbin
  15. DAEMON="/home/arran/public_html/reader/update_daemon2.php"
  16. DAEMONDIR=/home/arran/public_html/reader/
  17. PIDFILE=/var/run/tinytinyrss.pid
  18.  
  19. test -x $DAEMON || exit 0
  20.  
  21. . /lib/lsb/init-functions
  22.  
  23. case "$1" in
  24. start)
  25. log_daemon_msg "Starting SCM Manager" "tinytinyrss"
  26. start-stop-daemon --start -p $PIDFILE --group arran --chdir $DAEMONDIR -b --chuid arran --make-pidfile --exec $DAEMON
  27. log_end_msg $?
  28. ;;
  29. stop)
  30. log_daemon_msg "Stopping SCM Manager" "tinytinyrss"
  31. #killproc -p $PIDFILE $DAEMON
  32. start-stop-daemon --stop -p $PIDFILE -retry 10000
  33. log_end_msg $?
  34. ;;
  35. force-reload|restart)
  36. $0 stop
  37. $0 start
  38. ;;
  39. status)
  40. status_of_proc -p $PIDFILE $DAEMON tinytinyrss && exit 0 || exit $?
  41. ;;
  42. *)
  43. echo "Usage: /etc/init.d/atd {start|stop|restart|force-reload|status}"
  44. exit 1
  45. ;;
  46. esac
  47.  
  48. exit 0
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement