diff --git a/systemd_units/update.sh b/systemd_units/update.sh index 1f50fbe..3c10872 100755 --- a/systemd_units/update.sh +++ b/systemd_units/update.sh @@ -18,10 +18,12 @@ for service in "${services[@]}"; do prettyPrint "Installing ${service}" sudo cp -v "${service}.service" /etc/systemd/system/ sudo systemctl daemon-reload - prettyPrint "Restarting ${service}" - sudo systemctl restart "${service}" - if [ ! -f "/etc/systemd/system/multi-user.target.wants/${service}.service" ]; then - prettyPrint "Enabling ${service}" - sudo systemctl enable "${service}" + if [ "${NO_RESTART}" = false ]; then + prettyPrint "Restarting ${service}" + sudo systemctl restart "${service}" + if [ ! -f "/etc/systemd/system/multi-user.target.wants/${service}.service" ]; then + prettyPrint "Enabling ${service}" + sudo systemctl enable "${service}" + fi fi done