mirror of
https://github.com/lrnselfreliance/wrolpi.git
synced 2026-10-25 18:40:06 -04:00
Using sudo when upgrading.
This commit is contained in:
parent
94a2c50531
commit
00579759cc
1 changed files with 6 additions and 0 deletions
|
|
@ -34,6 +34,12 @@ if [ ! -d /opt/wrolpi ] || [ ! -d /opt/wrolpi/wrolpi ]; then
|
|||
exit 2
|
||||
fi
|
||||
|
||||
# Re-execute this script if it wasn't called with sudo.
|
||||
if [ $EUID != 0 ]; then
|
||||
sudo "$0" "$@"
|
||||
exit $?
|
||||
fi
|
||||
|
||||
set -x
|
||||
set -e
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue