mirror of
https://github.com/msfjarvis/server-config
synced 2025-08-14 12:57:00 +05:30
systemd_units: Allow skipping service restarts
Signed-off-by: Harsh Shandilya <msfjarvis@gmail.com>
This commit is contained in:
parent
ed9df8eac5
commit
03ec32c1ea
1 changed files with 7 additions and 5 deletions
|
@ -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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue