Guest User

Untitled

a guest
May 27th, 2018
78
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.80 KB | None | 0 0
  1. #!/bin/sh
  2.  
  3. # ubuntu start/stop
  4.  
  5. BIN="/usr/bin/clarity"
  6. test -x $BIN || exit 0
  7. CMD="$BIN -- --username=admin --password=secret --port=8989 /var/www/weblogs/ "
  8.  
  9. . /lib/lsb/init-functions
  10.  
  11. case "$1" in
  12. start)
  13. log_daemon_msg "Starting service" "clarity"
  14. start-stop-daemon --start --make-pidfile --pidfile /var/run/weblog.pid --background --startas $CMD
  15. log_end_msg $?
  16. ;;
  17. stop)
  18. log_daemon_msg "Shutting down service" "clarity"
  19. start-stop-daemon --stop --pidfile /var/run/weblog.pid
  20. log_end_msg $?
  21. rm -f /var/run/weblog.pid
  22. ;;
  23. *)
  24. log_action_msg "Usage: /etc/init.d/weblog {start|stop}"
  25. exit 2
  26. ;;
  27. esac
  28.  
  29. exit 0
Add Comment
Please, Sign In to add comment