Skip to content
Permalink
Browse files

Write check_temper

  • Loading branch information...
NEMS Linux
NEMS Linux committed Jul 30, 2019
2 parents 819668f + 0ba0387 commit fac6fd6a55b56bed9ee721afaff6afbfc4905ef1
Showing with 27 additions and 0 deletions.
  1. +8 −0 fixes.sh
  2. +3 −0 info2.sh
  3. +16 −0 webhooktest.sh
@@ -308,12 +308,20 @@ fi

if (( $(awk 'BEGIN {print ("'$ver'" >= "'1.5'")}') )); then

<<<<<<< HEAD
# Install TEMPer Support
if [ $(dpkg-query -W -f='${Status}' python3-serial 2>/dev/null | grep -c "ok installed") -eq 0 ]; then
/root/nems/nems-admin/build/500-temper
fi


=======
# Install nems-webhooktest command if not already
if [ ! -f /usr/local/bin/nems-webhooktest ]; then
ln -s /usr/local/share/nems/nems-scripts/webhooktest.sh /usr/local/bin/nems-webhooktest
fi

>>>>>>> 0ba038738ba33e33ca95cec6dc57e7a20f7cbfe3
# Move NEMS TV Dashboard out of nems-www
if [[ ! -d /var/www/nems-tv ]]; then
cd /var/www
@@ -444,13 +444,16 @@ EOQ;
break;
<<<<<<< HEAD
case 12:
while (stristr($temper = shell_exec('/usr/local/share/nems/nems-scripts/temper.py --json'),'error')) {
}
print_r($temper);
break;
=======
>>>>>>> 0ba038738ba33e33ca95cec6dc57e7a20f7cbfe3
}
@@ -0,0 +1,16 @@
#!/usr/bin/env php
<?php
$user=trim(shell_exec('whoami'));
if ($user != 'root') die('You cannot run this program as ' . $user . '. Please use sudo.' . PHP_EOL);
echo 'Sending a webhook test... ';
$currentissueshead = 'NEMS Linux Test Notification';
$nemsstate = $state = $currentissues = 'Testing';
$fieldsarray[] = array(
'name' => 'Webhook Test',
'value' => 'Successful.',
'inline' => false
);
include('/root/nems/nems-tools/webhook');
echo 'Done.' . PHP_EOL;
?>

0 comments on commit fac6fd6

Please sign in to comment.
You can’t perform that action at this time.