Permalink
Browse files

Warn if already initialized

  • Loading branch information...
Cat5TV committed Aug 26, 2018
1 parent 2b0fbe0 commit 4d6e3e8be686b221267b5d63f06ebe01c0af935e
Showing with 10 additions and 0 deletions.
  1. +10 −0 init.sh
10 init.sh
@@ -5,6 +5,7 @@
ver=$(/usr/local/share/nems/nems-scripts/info.sh nemsver)
platform=$(/usr/local/share/nems/nems-scripts/info.sh platform)
init=$(/usr/local/share/nems/nems-scripts/info.sh init)
if [[ -f /tmp/qf.sh ]]; then
qfrunning=`ps aux | grep -i "myscript.sh" | grep -v "grep" | wc -l`
@@ -65,6 +66,15 @@ else
echo "Your new password has been set for the Linux pi user."
echo "Use that password to access NEMS over SSH or when logging in to Webmin."
fi
if [[ $init = 1 ]]; then
echo "WARNING! Your NEMS server is already initialized!"
echo " If you proceed, all settings will be lost."
echo " If you wish to keep your settings, please
echo " make a copy of your backup.nems file first,
echo " initialize, and then run nems-restore."
echo ""
fi
isValidUsername() {
local re='^[[:lower:]_][[:lower:][:digit:]_-]{2,15}$'

0 comments on commit 4d6e3e8

Please sign in to comment.