Skip to content
Permalink
Browse files

Add NEMS Cloud Services Dashboard

  • Loading branch information...
NEMS Linux
NEMS Linux committed Jul 19, 2019
1 parent 239f477 commit be33b7fc91314d58f31be993062e4c0b4c23e3a1
Showing with 12 additions and 0 deletions.
  1. +2 −0 cloud.sh
  2. +10 −0 info.sh
@@ -11,6 +11,7 @@
echo 'Checking if this NEMS server is authorized to use NEMS Cloud... ';
$cloudauth = shell_exec('/usr/local/bin/nems-info cloudauth');
if ($cloudauth == 1) {
file_put_contents('/var/log/nems/cloudauth.log','1');
echo 'Yes.' . PHP_EOL;
$nems = new stdClass();
@@ -106,6 +107,7 @@
} else {
file_put_contents('/var/log/nems/cloudauth.log','0');
echo 'No.';
}
echo PHP_EOL;
10 info.sh
@@ -430,6 +430,16 @@ elif [[ $COMMAND == "alias" ]]; then
elif [[ $COMMAND == "state" ]]; then
/usr/local/share/nems/nems-scripts/stats-livestatus-full.sh

elif [[ $COMMAND == "cloudauthcache" ]]; then
# A fast load of the cached cloudauth response rather than realtime connect
# The cache file is generated every time NEMS Cloud Services connects
if [[ -f /var/log/nems/cloudauth.log ]]; then
cat /var/log/nems/cloudauth.log
else
# Fall back on the live version
/usr/local/bin/nems-info clouadauth
fi

elif [[ $COMMAND == "cloudauth" ]]; then
hwid=`/usr/local/bin/nems-info hwid`
osbpass=$(cat /usr/local/share/nems/nems.conf | grep osbpass | printf '%s' $(cut -n -d '=' -f 2))

0 comments on commit be33b7f

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