added sudo check, cleaned up comments
This commit is contained in:
@@ -1,5 +1,11 @@
|
||||
#!/bin/bash
|
||||
|
||||
if [ "$EUID" -ne 0 ]
|
||||
then
|
||||
echo "Please run as root"
|
||||
exit
|
||||
fi
|
||||
|
||||
# disable restart prompt for services during an update
|
||||
if [[ ! -f /etc/needrestart/conf.d/no-prompt.conf ]] ; then
|
||||
echo "\$nrconf{restart} = 'a';" >> /etc/needrestart/conf.d/no-prompt.conf
|
||||
|
||||
Reference in New Issue
Block a user