Guest User

OpenProject init.d script

a guest
Mar 17th, 2015
325
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Bash 0.75 KB | None | 0 0
  1. #!/bin/sh
  2. # Init script for openproject-ce
  3. # Generated by pkgr.
  4. # Implemented based on LSB Core 3.1:
  5. #   * Sections: 20.2, 20.3
  6. #
  7. ### BEGIN INIT INFO
  8. # Provides:          openproject-ce
  9. # Required-Start:    $remote_fs $syslog
  10. # Required-Stop:     $remote_fs $syslog
  11. # Default-Start:     2 3 4 5
  12. # Default-Stop:      0 1 6
  13. # Description:       OpenProject Community Edition packaged by packager.io
  14. ### END INIT INFO
  15.  
  16. set -e
  17.  
  18. name="openproject-ce"
  19.  
  20. delegate() {
  21.   for file in $(ls -1 /etc/init.d/${name}-*[!-0-9] 2>/dev/null); do
  22.     ${file} "${1}"
  23.   done
  24. }
  25.  
  26. case "$1" in
  27.   start|stop|force-stop|status|restart) delegate "${1}" ;;
  28.   *)
  29.     echo "Usage: $SCRIPTNAME {start|stop|force-stop|status|restart}" >&2
  30.     exit 3
  31.   ;;
  32. esac
  33.  
  34. exit $?m
Advertisement
Add Comment
Please, Sign In to add comment