Restart
no se refiere a dependencias fallidas sino al proceso perteneciente a esta unidad.
man systemd.service
:
Restart=
Configures whether the service shall be restarted when the service process exits, is killed, or a timeout is reached. The service process may be the main service process, but it may also be one of the processes specified with ExecStartPre=, ExecStartPost=, ExecStop=, ExecStopPost=, or ExecReload=. When the death of the process is a result of systemd operation (e.g. service stop or restart), the service will not be restarted. Timeouts include missing the watchdog "keep-alive ping" deadline and a service start, reload, and stop operation timeouts.
Вы не станете намного короче. Если проблема в том, что команда, которую вы хотите запустить, длинная, вы можете написать вспомогательную функцию, например.
r(){ env "$@" foo with lots of args ; }
r FOO=1
r FOO=2
r FOO=1 BAR=7
r FOO='1 BAR=7'
Если есть символ, который, как вы знаете, не будет ни в именах, ни в значениях переменных среды, вы можете использовать это для разделения, или вы можете попытаться правильно заключить значения в кавычки и использовать eval
.
Вопрос в том, почему вы хотите это сделать?