diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-14 13:42:30 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-14 13:42:30 +0000 |
commit | 75808db17caf8b960b351e3408e74142f4c85aac (patch) | |
tree | 7989e9c09a4240248bf4658a22208a0a52d991c4 /t/recipes/checks/init-d/init.d-general/build-spec/debian/init.d-general-new-style.init | |
parent | Initial commit. (diff) | |
download | lintian-75808db17caf8b960b351e3408e74142f4c85aac.tar.xz lintian-75808db17caf8b960b351e3408e74142f4c85aac.zip |
Adding upstream version 2.117.0.upstream/2.117.0upstream
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 't/recipes/checks/init-d/init.d-general/build-spec/debian/init.d-general-new-style.init')
-rw-r--r-- | t/recipes/checks/init-d/init.d-general/build-spec/debian/init.d-general-new-style.init | 31 |
1 files changed, 31 insertions, 0 deletions
diff --git a/t/recipes/checks/init-d/init.d-general/build-spec/debian/init.d-general-new-style.init b/t/recipes/checks/init-d/init.d-general/build-spec/debian/init.d-general-new-style.init new file mode 100644 index 0000000..e815337 --- /dev/null +++ b/t/recipes/checks/init-d/init.d-general/build-spec/debian/init.d-general-new-style.init @@ -0,0 +1,31 @@ +#!/usr/bin/env /lib/init/init-d-script +### BEGIN INIT INFO +# Provides: init.d-general-new-style +# Should-Start: $syslog +# Required-Start: $time $local_fs +# Required-Stop: $time +# Default-Start: 2 3 4 5 +# Default-Stop: 0 1 6 +# Short-Description: init.d-general-new-style +### END INIT INFO +NAME='init.d-general-new-style' +DESC='init.d-general-new-style description here' +DAEMON=/usr/sbin/init.d-general-new-styl + +daemon_ () { /usr/bin/daemon --noconfig --name "${NAME}" "$@"; } +if ! test -x '/usr/bin/daemon' ; then + log_failure_msg "install \`daemon' package to use ${NAME} script" + exit 1 +fi + +do_start_cmd_override () { + daemon_ "${DAEMON}" +} + +do_stop_cmd_override () { + if daemon_ --running ; then + daemon_ --stop + fi +} + +# vim: ft=sh |