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

Minor tweaks

parent 085265ac
...@@ -6,14 +6,16 @@ ...@@ -6,14 +6,16 @@
# License version 2. This program is licensed "as is" without any # License version 2. This program is licensed "as is" without any
# warranty of any kind, whether express or implied. # warranty of any kind, whether express or implied.
# define sane $PATH
export PATH=/usr/sbin:/usr/bin:/sbin:/bin
#-----------------------------------------------------------------------------------------------------------------------------------------# #-----------------------------------------------------------------------------------------------------------------------------------------#
# check for root # check for root
# #
if [[ $EUID != 0 ]]; then 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 sleep 2
exit exit 1
fi fi
......
...@@ -6,6 +6,7 @@ ...@@ -6,6 +6,7 @@
# License version 2. This program is licensed "as is" without any # License version 2. This program is licensed "as is" without any
# warranty of any kind, whether express or implied. # warranty of any kind, whether express or implied.
[[ -n ${SUDO_USER} ]] && SUDO="sudo "
function jobs () function jobs ()
{ {
...@@ -55,9 +56,8 @@ function jobs () ...@@ -55,9 +56,8 @@ function jobs ()
# #
"Monitor" ) "Monitor" )
clear clear
armbianmonitor armbianmonitor -m
echo -e "\nType \e[92m$0\e[0m to get back\n" sleep 2
exit
;; ;;
...@@ -66,7 +66,7 @@ function jobs () ...@@ -66,7 +66,7 @@ function jobs ()
"Consumption" ) "Consumption" )
clear clear
h3consumption 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 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