3 # Provides: archipelago
4 # Required-Start: $network $local_fs $remote_fs
5 # Required-Stop: $remote_fs
6 # Default-Start: 2 3 4 5
8 # Short-Description: <Enter a short description of the sortware>
9 # Description: <Enter a long description of the software>
14 # Author: philipgian<philipgian@grnet.gr>
16 # PATH should only include /usr/* if it runs after the mountnfs.sh script */
17 PATH=/sbin:/usr/sbin:/bin:/usr/bin
18 DESC=archipelago # Introduce a short description here
19 NAME=archipelago # Introduce the short server's name here
20 DAEMON=/usr/bin/archipelago # Introduce the server's location here
21 DAEMON_ARGS="" # Arguments to run the daemon with
22 #PIDFILE=/var/run/$NAME.pid
23 SCRIPTNAME=/etc/init.d/$NAME
25 # Exit if the package is not installed
26 [ -x $DAEMON ] || exit 0
28 # Read configuration variable file if it is present
29 #[ -r /etc/default/$NAME ] && . /etc/default/$NAME
31 # Load the VERBOSE setting and other rcS variables
34 # Define LSB log_* functions.
35 # Depend on lsb-base (>= 3.0-6) to ensure that this file is present.
36 . /lib/lsb/init-functions
39 # Function that starts the daemon/service
43 $DAEMON start && return 0
47 # Function that stops the daemon/service
51 $DAEMON stop && return 0
57 [ "$VERBOSE" != no ] && log_daemon_msg "Starting $DESC " "$NAME"
60 0|1) [ "$VERBOSE" != no ] && log_end_msg 0 ;;
61 2) [ "$VERBOSE" != no ] && log_end_msg 1 ;;
65 [ "$VERBOSE" != no ] && log_daemon_msg "Stopping $DESC" "$NAME"
68 0|1) [ "$VERBOSE" != no ] && log_end_msg 0 ;;
69 2) [ "$VERBOSE" != no ] && log_end_msg 1 ;;
77 # If the "reload" option is implemented then remove the
78 # 'force-reload' alias
80 log_daemon_msg "Restarting $DESC" "$NAME"
87 1) log_end_msg 1 ;; # Old process is still running
88 *) log_end_msg 1 ;; # Failed to start
98 echo "Usage: $SCRIPTNAME {start|stop|status|restart|force-reload}" >&2