[UPDATE] - id root for monithor-server

This commit is contained in:
Prof Isen 2022-03-16 23:44:27 +00:00
parent 69069c5919
commit 192382c8c2
2 changed files with 8 additions and 10 deletions

View File

@ -1,10 +0,0 @@
<html>
<head>
<title>MoniThor on </title>
<meta http-equiv="refresh" content="1" />
</head>
<title>MONITHOR</title>
!!!! Initialization !!!!

View File

@ -5,6 +5,14 @@ ScriptDir=/usr/local/bin/monithor-server.d/
SondeFile=/etc/monithor-server/sonde.cfg SondeFile=/etc/monithor-server/sonde.cfg
source /etc/monithor-server/service.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}" [[ "${Crypted}" == "yes" ]] && NcCmd="cryptcat -k ${LocalPassword} -l ${LocalIp} -p ${LocalPort} " || NcCmd="nc -l ${LocalIp} ${LocalPort}"
if [[ "${1}" == "start" ]] if [[ "${1}" == "start" ]]