diff --git a/zabbix_agent.sh b/zabbix_agent.sh index 9ccbad3..db7615a 100644 --- a/zabbix_agent.sh +++ b/zabbix_agent.sh @@ -2,6 +2,12 @@ # installs the zabbix agent and configures it +# make sure we are running as sudo +if [ "$EUID" -ne 0 ]; then + echo "Please run as root" + exit +fi + # create temp directory for downloaded files DIRECTORY="/tmp/zabbix_install" mkdir ${DIRECTORY}