/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 at recompile
  • Date: 2020-02-07 20:53:34 UTC
  • Revision ID: teddy@recompile.se-20200207205334-dp41p8c8vw0ytik5
Allow users to more easily alter mandos.service

The sysvinit script uses /etc/default/mandos as an environment file,
and supports adding additional server options to a DAEMON_ARGS
environment variable.  This should be supported by the systemd
service, too.

* mandos.service ([Service]/EnvironmentFile): New; set to
  "/etc/default/mandos ".
  ([Service]/ExecStart): Append "$DAEMON_ARGS".

Show diffs side-by-side

added added

removed removed

Lines of Context:
11
11
 
12
12
# Author: Teddy Hogeborn <teddy@recompile.se>
13
13
# Author: Björn Påhlsson <belorn@recompile.se>
14
 
#
15
 
# Please remove the "Author" lines above and replace them
16
 
# with your own name if you copy and modify this script.
17
14
 
18
15
# Do NOT "set -e"
19
16
 
77
74
        #   1 if daemon was already stopped
78
75
        #   2 if daemon could not be stopped
79
76
        #   other if a failure occurred
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
 
77
        start-stop-daemon --stop --quiet --retry=TERM/30/KILL/5 --pidfile $PIDFILE --name $NAME
83
78
        RETVAL="$?"
84
79
        [ "$RETVAL" = 2 ] && return 2
85
80
        # Wait for children to finish too if this is a daemon that forks