#!/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