Commit 0fb01df9 authored by ThomasKaiser's avatar ThomasKaiser
Browse files

Minor tweaks

parent 085265ac
......@@ -6,14 +6,16 @@
# License version 2. This program is licensed "as is" without any
# warranty of any kind, whether express or implied.
# define sane $PATH
export PATH=/usr/sbin:/usr/bin:/sbin:/bin
#-----------------------------------------------------------------------------------------------------------------------------------------#
# check for root
#
if [[ $EUID != 0 ]]; then
echo "Warning. This script requires root privileges. Exiting ..."
echo "This tool requires root privileges. Try again with \"sudo \" please ..." >&2
sleep 2
exit
exit 1
fi
......
......@@ -6,6 +6,7 @@
# License version 2. This program is licensed "as is" without any
# warranty of any kind, whether express or implied.
[[ -n ${SUDO_USER} ]] && SUDO="sudo "
function jobs ()
{
......@@ -55,9 +56,8 @@ function jobs ()
#
"Monitor" )
clear
armbianmonitor
echo -e "\nType \e[92m$0\e[0m to get back\n"
exit
armbianmonitor -m
sleep 2
;;
......@@ -66,7 +66,7 @@ function jobs ()
"Consumption" )
clear
h3consumption
echo -e "\nType \e[92m$0\e[0m to get back\n"
echo -e "\nType \e[92m${SUDO}${0##*/}\e[0m to get back\n"
exit
;;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment