aboutsummaryrefslogtreecommitdiff
path: root/src/common-utils/bin/systemctl
diff options
context:
space:
mode:
authorChuck Lantz <clantz@microsoft.com>2022-12-16 20:47:21 +0300
committerGitHub <noreply@github.com>2022-12-16 20:47:21 +0300
commitbf058dc49492b3a102a28ed25764a517fcebfb40 (patch)
tree6ccc831064fab57ea6fa2f0c530202ac0d73ff08 /src/common-utils/bin/systemctl
parent7fa90110d762797cc0b1c2fe8fcc028c9b813d56 (diff)
Multi-distro support for common script, refactor, fixes (#326)
Diffstat (limited to 'src/common-utils/bin/systemctl')
-rwxr-xr-xsrc/common-utils/bin/systemctl7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/common-utils/bin/systemctl b/src/common-utils/bin/systemctl
new file mode 100755
index 0000000..4ead985
--- /dev/null
+++ b/src/common-utils/bin/systemctl
@@ -0,0 +1,7 @@
+#!/bin/sh
+set -e
+if [ -d "/run/systemd/system" ]; then
+ exec /bin/systemctl "$@"
+else
+ echo '\n"systemd" is not running in this container due to its overhead.\nUse the "service" command to start services instead. e.g.: \n\nservice --status-all'
+fi