added sudo check, cleaned up comments
This commit is contained in:
@@ -1,5 +1,12 @@
|
||||
# ask to set static ip address
|
||||
#!/bin/bash
|
||||
|
||||
if [ "$EUID" -ne 0 ]
|
||||
then
|
||||
echo "Please run as root"
|
||||
exit
|
||||
fi
|
||||
|
||||
# set static ip address
|
||||
if [[ ! -d /etc/cloud ]]
|
||||
then
|
||||
read -r -p "Enter Static IP Address with subnet prefix: " staticip
|
||||
|
||||
Reference in New Issue
Block a user