mirror of
ssh://git.janware.com/janware/proj/jw-pkg
synced 2026-04-25 09:35:54 +02:00
Apply some more ASCII-art to systemctl-wrapper.sh's output. Signed-off-by: Jan Lindemann <jan@janware.com>
18 lines
384 B
Bash
18 lines
384 B
Bash
#!/bin/bash
|
|
|
|
reason=""
|
|
systemctl="/usr/bin/systemctl"
|
|
|
|
if [ "$(ps -p 1 -o comm=)" != "systemd" ]; then
|
|
reason="Trying to run $exe in an environment not controlled by Systemd"
|
|
elif [ ! -x $systemctl ]; then
|
|
reason="Can't run $systemctl"
|
|
else
|
|
exec $systemctl "$@"
|
|
fi
|
|
|
|
title="------------ $reason ------------"
|
|
echo ",$title >"
|
|
echo "| Ignored: systemctl $@"
|
|
echo "\`$title <"
|
|
exit 0
|