mirror of
https://github.com/lrnselfreliance/wrolpi.git
synced 2026-10-26 02:48:38 -04:00
Requiring sudo for help script, it will change to other users as needed.
This commit is contained in:
parent
dc70b40db9
commit
b020fbfeee
1 changed files with 5 additions and 1 deletions
6
help.sh
6
help.sh
|
|
@ -5,7 +5,11 @@ MEDIA_DIRECTORY=/media/wrolpi
|
|||
# Source environment file after declaring globals.
|
||||
[ -f /opt/wrolpi/.env ] && source /opt/wrolpi/.env
|
||||
|
||||
echo "This script is running as $(whoami)"
|
||||
# Re-execute this script if it wasn't called with sudo.
|
||||
if [ $EUID != 0 ]; then
|
||||
sudo "$0" "$@"
|
||||
exit $?
|
||||
fi
|
||||
|
||||
function check_directory() {
|
||||
directory=$1
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue