aboutsummaryrefslogtreecommitdiff
path: root/sh
diff options
context:
space:
mode:
authorLinkTed <link.ted@mailbox.org>2021-06-13 19:26:24 +0200
committerMike Frysinger <vapier@gmail.com>2021-12-23 17:29:10 -0500
commit6e214b261604c4ab1ffc244272443a587bb59927 (patch)
tree618ab3e7bb84f80eff7a8c8e23c1700a2ca587be /sh
parentfd1e4a384af44a8687b3a5369283f80f1cf29d84 (diff)
capabilities: Add support for Linux capabilities(7)
This adds capabilities for start-stop-daemon by adding --capabilities option. As a result, the user can specify the inheritable, ambient and bounding set by define capabilities in the service script. This fixes #314.
Diffstat (limited to 'sh')
-rw-r--r--sh/start-stop-daemon.sh1
-rw-r--r--sh/supervise-daemon.sh1
2 files changed, 2 insertions, 0 deletions
diff --git a/sh/start-stop-daemon.sh b/sh/start-stop-daemon.sh
index 95e62dce..02a7cd84 100644
--- a/sh/start-stop-daemon.sh
+++ b/sh/start-stop-daemon.sh
@@ -53,6 +53,7 @@ ssd_start()
${error_log+--stderr} $error_log \
${output_logger_arg} \
${error_logger_arg} \
+ ${capabilities+--capabilities} "$capabilities" \
${procname:+--name} $procname \
${pidfile:+--pidfile} $pidfile \
${command_user+--user} $command_user \
diff --git a/sh/supervise-daemon.sh b/sh/supervise-daemon.sh
index a8541922..be4c9d71 100644
--- a/sh/supervise-daemon.sh
+++ b/sh/supervise-daemon.sh
@@ -36,6 +36,7 @@ supervise_start()
${respawn_period:+--respawn-period} $respawn_period \
${healthcheck_delay:+--healthcheck-delay} $healthcheck_delay \
${healthcheck_timer:+--healthcheck-timer} $healthcheck_timer \
+ ${capabilities+--capabilities} "$capabilities" \
${command_user+--user} $command_user \
${umask+--umask} $umask \
${supervise_daemon_args:-${start_stop_daemon_args}} \