mirror of
https://github.com/msfjarvis/server-config
synced 2025-08-14 12:57:00 +05:30
systemd: Bail properly on root auth failure
Signed-off-by: Harsh Shandilya <msfjarvis@gmail.com>
This commit is contained in:
parent
c1d85b4eaa
commit
88f70da79b
1 changed files with 2 additions and 0 deletions
|
@ -15,6 +15,8 @@ for service in "${services[@]}"; do
|
|||
if [ "${1}" ] && [[ "${service}" != "${1}" && "${service}.service" != "${1}" ]]; then
|
||||
continue
|
||||
fi
|
||||
prettyPrint "Checking root access"
|
||||
sudo -v || return 1
|
||||
prettyPrint "Installing ${service}"
|
||||
sudo cp -v "${service}.service" /etc/systemd/system/
|
||||
sudo systemctl daemon-reload
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue