2026-03-14 14:04:10 +01:00
|
|
|
#!/bin/bash
|
|
|
|
|
|
|
|
|
|
reason=""
|
|
|
|
|
systemctl="/usr/bin/systemctl"
|
|
|
|
|
|
2026-03-16 19:14:37 +01:00
|
|
|
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 "$@"
|
2026-03-14 14:04:10 +01:00
|
|
|
fi
|
|
|
|
|
|
2026-03-16 19:14:37 +01:00
|
|
|
title="------------ $reason ------------"
|
|
|
|
|
echo ",$title >"
|
|
|
|
|
echo "| Ignored: systemctl $@"
|
|
|
|
|
echo "\`$title <"
|
|
|
|
|
exit 0
|