/mandos/trunk

To get this branch, use:
bzr branch http://bzr.recompile.se/loggerhead/mandos/trunk

« back to all changes in this revision

Viewing changes to init.d-mandos

  • Committer: Teddy Hogeborn
  • Date: 2016-03-08 00:52:12 UTC
  • mfrom: (237.4.69 release)
  • Revision ID: teddy@recompile.se-20160308005212-o5m2eaphq6ze5bb0
Merge from release branch

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
1
#! /bin/sh
2
2
### BEGIN INIT INFO
3
3
# Provides:          mandos
4
 
# Required-Start:    $remote_fs $syslog avahi
5
 
# Required-Stop:     $remote_fs $syslog avahi
 
4
# Required-Start:    $remote_fs $syslog avahi-daemon
 
5
# Required-Stop:     $remote_fs $syslog avahi-daemon
6
6
# Default-Start:     2 3 4 5
7
7
# Default-Stop:      0 1 6
8
8
# Short-Description: Mandos server
44
44
. /lib/init/vars.sh
45
45
 
46
46
# Define LSB log_* functions.
47
 
# Depend on lsb-base (>= 3.2-14) to ensure that this file is present.
 
47
# Depend on lsb-base (>= 3.2-14) to ensure that this file is present
 
48
# and status_of_proc is working.
48
49
. /lib/lsb/init-functions
49
50
 
50
51
#
76
77
        #   1 if daemon was already stopped
77
78
        #   2 if daemon could not be stopped
78
79
        #   other if a failure occurred
79
 
        start-stop-daemon --stop --quiet --retry=TERM/30/KILL/5 --pidfile $PIDFILE --name $NAME
 
80
        start-stop-daemon --stop --quiet --pidfile $PIDFILE --name $NAME
 
81
        mandos-ctl >/dev/null 2>&1
 
82
        start-stop-daemon --stop --quiet --retry=30/KILL/5 --pidfile $PIDFILE --name $NAME
80
83
        RETVAL="$?"
81
84
        [ "$RETVAL" = 2 ] && return 2
82
85
        # Wait for children to finish too if this is a daemon that forks
122
125
                2) [ "$VERBOSE" != no ] && log_end_msg 1 ;;
123
126
        esac
124
127
        ;;
 
128
  status)
 
129
        status_of_proc "$DAEMON" "$NAME" -p "$PIDFILE" && exit 0 || exit $?
 
130
        ;;
125
131
  #reload|force-reload)
126
132
        #
127
133
        # If do_reload() is not implemented then leave this commented out
148
154
                esac
149
155
                ;;
150
156
          *)
151
 
                # Failed to stop
 
157
                # Failed to stop
152
158
                log_end_msg 1
153
159
                ;;
154
160
        esac
155
161
        ;;
156
 
  status)
157
 
        status_of_proc "$DAEMON" "$NAME" -p "$PIDFILE"
158
 
        ;;
159
162
  *)
160
163
        #echo "Usage: $SCRIPTNAME {start|stop|restart|reload|force-reload}" >&2
161
 
        echo "Usage: $SCRIPTNAME {start|stop|restart|force-reload}" >&2
 
164
        echo "Usage: $SCRIPTNAME {start|stop|status|restart|force-reload}" >&2
162
165
        exit 3
163
166
        ;;
164
167
esac