mirror of
https://github.com/CopterExpress/clever-show.git
synced 2026-05-27 15:39:32 +00:00
client_setup: add run as root check
This commit is contained in:
@@ -4,6 +4,11 @@
|
||||
# $3 - hostname of rpi
|
||||
# $4 - server ip
|
||||
|
||||
if [ $(whoami) != "root" ]; then
|
||||
echo -e "\nThis should be run as root!\n"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
# check if enough arguments
|
||||
if [[ $# -ne 4 ]] ; then
|
||||
echo -e "\nPlease, enter arguments: router ssid, wifi password, copter id and server ip"
|
||||
|
||||
Reference in New Issue
Block a user