initial code changes
This commit is contained in:
@@ -6,21 +6,21 @@ if (( $EUID != 0 )); then
|
||||
exit
|
||||
fi
|
||||
|
||||
#this is a weak check, but will catch most cases
|
||||
if [ $SUDO_USER ]; then
|
||||
user=$SUDO_USER
|
||||
else
|
||||
echo "You should not run this script as root. Use sudo as a normal user"
|
||||
exit
|
||||
fi
|
||||
|
||||
if [ "$user" == root ]; then
|
||||
echo "You should not run this script as root. Use sudo as a normal user"
|
||||
exit
|
||||
fi
|
||||
# #this is a weak check, but will catch most cases
|
||||
# if [ $SUDO_USER ]; then
|
||||
# user=$SUDO_USER
|
||||
# else
|
||||
# echo "You should not run this script as root. Use sudo as a normal user"
|
||||
# exit
|
||||
# fi
|
||||
#
|
||||
# if [ "$user" == root ]; then
|
||||
# echo "You should not run this script as root. Use sudo as a normal user"
|
||||
# exit
|
||||
# fi
|
||||
|
||||
# initiate logging
|
||||
logfile='octoprint_deploy.log'
|
||||
logfile='octodocker_deploy.log'
|
||||
SCRIPTDIR=$(dirname $(readlink -f $0))
|
||||
source $SCRIPTDIR/plugins.sh
|
||||
source $SCRIPTDIR/prepare.sh
|
||||
|
||||
Reference in New Issue
Block a user