mirror of
https://github.com/rootzoll/raspiblitz.git
synced 2025-02-25 15:10:38 +01:00
commit
b84c05ecaf
2 changed files with 21 additions and 7 deletions
|
@ -638,12 +638,22 @@ fi
|
|||
choice="off"; check=$(echo "${CHOICES}" | grep -c "t")
|
||||
if [ ${check} -eq 1 ]; then choice="on"; fi
|
||||
if [ "${thunderhub}" != "${choice}" ]; then
|
||||
echo " ThunderHub setting changed .."
|
||||
echo "ThunderHub Setting changed .."
|
||||
anychange=1
|
||||
sudo -u admin /home/admin/config.scripts/bonus.thunderhub.sh ${choice}
|
||||
source /mnt/hdd/raspiblitz.conf
|
||||
if [ "${thunderhub}" = "on" ]; then
|
||||
sudo -u admin /home/admin/config.scripts/bonus.thunderhub.sh menu
|
||||
/home/admin/config.scripts/bonus.thunderhub.sh ${choice}
|
||||
errorOnInstall=$?
|
||||
if [ "${choice}" = "on" ]; then
|
||||
if [ ${errorOnInstall} -eq 0 ]; then
|
||||
sudo systemctl start thunderhub
|
||||
echo "waiting 10 secs .."
|
||||
sleep 10
|
||||
/home/admin/config.scripts/bonus.thunderhub.sh menu
|
||||
else
|
||||
l1="!!! FAIL on ThunderHub install !!!"
|
||||
l2="Try manual install on terminal after reboot with:"
|
||||
l3="/home/admin/config.scripts/bonus.thunderhub.sh on"
|
||||
dialog --title 'FAIL' --msgbox "${l1}\n${l2}\n${l3}" 7 65
|
||||
fi
|
||||
fi
|
||||
else
|
||||
echo "ThunderHub setting unchanged."
|
||||
|
|
|
@ -75,6 +75,8 @@ if [ "$1" = "1" ] || [ "$1" = "on" ]; then
|
|||
# download and install
|
||||
sudo -u thunderhub git clone https://github.com/apotdevin/thunderhub.git /home/thunderhub/thunderhub
|
||||
cd /home/thunderhub/thunderhub
|
||||
# https://github.com/apotdevin/thunderhub/releases
|
||||
sudo -u thunderhub git reset --hard v0.6.13
|
||||
echo "Running npm install and run build..."
|
||||
sudo -u thunderhub npm install
|
||||
sudo -u thunderhub npm run build
|
||||
|
@ -139,7 +141,7 @@ EOF
|
|||
sudo rm -f /home/thunderhub/thubConfig.yaml
|
||||
sudo mv /home/admin/thubConfig.yaml /home/thunderhub/thubConfig.yaml
|
||||
sudo chown thunderhub:thunderhub /home/thunderhub/thubConfig.yaml
|
||||
sudo chown 600 /home/thunderhub/thubConfig.yaml | exit 1
|
||||
sudo chmod 600 /home/thunderhub/thubConfig.yaml | exit 1
|
||||
|
||||
##################
|
||||
# SYSTEMD SERVICE
|
||||
|
@ -191,9 +193,11 @@ fi
|
|||
if [ "$1" = "0" ] || [ "$1" = "off" ]; then
|
||||
|
||||
echo "*** REMOVING THUNDERHUB ***"
|
||||
sudo userdel -rf thunderhub
|
||||
# remove systemd service
|
||||
sudo systemctl disable thunderhub
|
||||
sudo rm -f /etc/systemd/system/thunderhub.service
|
||||
# delete user and home directory
|
||||
sudo userdel -rf thunderhub
|
||||
echo "OK ThunderHub removed."
|
||||
|
||||
# setting value in raspi blitz config
|
||||
|
|
Loading…
Add table
Reference in a new issue