Package: redis-server
Version: 2:3.2.11-1~dotdeb+8.1
Severity: important

Was https://github.com/lamby/pkg-redis/issues/14

Please consider replacing `set -e` with step-by-step error checking in SysVInit 
scripts.

> Be careful of using set -e in init.d scripts

https://www.debian.org/doc/debian-policy/#writing-the-scripts

> Conforming scripts shall not specify the "exit on error" option (i.e. set -e) 
> when sourcing this file,  
> or calling any of the commands thus made available. 

http://refspecs.linuxfoundation.org/LSB_4.1.0/LSB-Core-generic/LSB-Core-generic/iniscrptfunc.html

BTW Using `/lib/init/init-d-script` produces a much nicer init script:

```bash
#!/bin/sh
# kFreeBSD do not accept scripts as interpreters, using #!/bin/sh and sourcing.
if [ true != "$INIT_D_SCRIPT_SOURCED" ] ; then
    set "$0" "$@"; INIT_D_SCRIPT_SOURCED=true . /lib/init/init-d-script
fi
### BEGIN INIT INFO
# Provides:          courier
# Required-Start:    courier-authdaemon $remote_fs $syslog
# Required-Stop:     $remote_fs $syslog
# Default-Start:     2 3 4 5
# Default-Stop:      0 1 6
# Short-Description: courier service
### END INIT INFO

# Author: Ondřej Surý <ond...@debian.org>

DAEMON="/usr/sbin/courier"
DESC="courier service"
PIDFILE="none"

DO_START=yes

do_start_cmd_override() {
    DAEMON_ARGS="start $DAEMON_ARGS"
    do_start_cmd
}

do_stop_cmd_override() {
    DAEMON_ARGS="stop $DAEMON_ARGS"
    do_start_cmd
}
```

https://anonscm.debian.org/git/collab-maint/courier.git/tree/debian/courier-mta.courier.init

Thank you.

Reply via email to