From 192382c8c2fc2c8d73ddd703465b6998bace8866 Mon Sep 17 00:00:00 2001 From: guillaume Date: Wed, 16 Mar 2022 23:44:27 +0000 Subject: [PATCH] [UPDATE] - id root for monithor-server --- debs/index.html | 10 ---------- .../usr/local/bin/monithor-server | 8 ++++++++ 2 files changed, 8 insertions(+), 10 deletions(-) delete mode 100644 debs/index.html diff --git a/debs/index.html b/debs/index.html deleted file mode 100644 index a386dce..0000000 --- a/debs/index.html +++ /dev/null @@ -1,10 +0,0 @@ - - - MoniThor on - - -MONITHOR - -!!!! Initialization !!!! - - diff --git a/debs/monithor-server_1.0-0_noarch/usr/local/bin/monithor-server b/debs/monithor-server_1.0-0_noarch/usr/local/bin/monithor-server index c15d295..13a1481 100755 --- a/debs/monithor-server_1.0-0_noarch/usr/local/bin/monithor-server +++ b/debs/monithor-server_1.0-0_noarch/usr/local/bin/monithor-server @@ -5,6 +5,14 @@ ScriptDir=/usr/local/bin/monithor-server.d/ SondeFile=/etc/monithor-server/sonde.cfg source /etc/monithor-server/service.cfg +if [[ $(id -u) != "0" ]] + then + echo "Not Root" + exit +fi + + + [[ "${Crypted}" == "yes" ]] && NcCmd="cryptcat -k ${LocalPassword} -l ${LocalIp} -p ${LocalPort} " || NcCmd="nc -l ${LocalIp} ${LocalPort}" if [[ "${1}" == "start" ]]