Browse Source

- remove autoreboot plugin; new location is ni-neutrino-plugins repo

master
vanhofen 6 years ago
parent
commit
2f9fbd20f0
  1. 5
      archive-sources/autoreboot/autoreboot.cfg
  2. 33
      archive-sources/autoreboot/autoreboot.sh
  3. 4
      make/plugins.mk

5
archive-sources/autoreboot/autoreboot.cfg

@ -1,5 +0,0 @@
name=Autoreboot
desc=Small plugin to reboot box (via timer)
desc.deutsch=Kleines Plugin, um die Box (via Timer) neu zu starten
type=3
shellwindow=0

33
archive-sources/autoreboot/autoreboot.sh

@ -1,33 +0,0 @@
#!/bin/sh
CONFIGDIR="/var/tuxbox/config"
nhttpd=${CONFIGDIR}"/nhttpd.conf"
htauth=$(grep "^mod_auth.authenticate" $nhttpd | cut -d"=" -f2)
htuser=$(grep "^mod_auth.username" $nhttpd | cut -d"=" -f2)
htpass=$(grep "^mod_auth.password" $nhttpd | cut -d"=" -f2)
htport=$(grep "^WebsiteMain.port" $nhttpd | cut -d"=" -f2)
if [ "$htauth" = "true" ]
then
hturl="http://$htuser:$htpass@127.0.0.1:$htport"
else
hturl="http://127.0.0.1:$htport"
fi
if [ $(wget -q -O - "$hturl/control/setmode?status" | sed 's/\r$//') = "on" ]
then
echo "[${0##*/}] record in progress; delay reboot"
new_alarm=$(($(date +%s)+300))
wget -q -O - "$hturl//control/timer?action=new&type=8&alarm=${new_alarm}&PluginName=autoreboot"
exit
fi
if [ $(wget -q -O - "$hturl/control/standby" | sed 's/\r$//') = "off" ]
then
wget -q -O - "$hturl/control/standby?on"
echo ""
sleep 20
fi
echo "[${0##*/}] will reboot now"
(sleep 1; reboot) &

4
make/plugins.mk

@ -195,8 +195,8 @@ pr-auto-timer: $(LIBPLUGINS) $(VARCONFIG)
install -m644 $(SOURCES)/pr-auto-timer/pr-auto-timer.rules.template $(VARCONFIG)/pr-auto-timer.rules
autoreboot: $(LIBPLUGINS)
install -m755 $(SOURCES)/$@/*.sh $(LIBPLUGINS)/
install -m644 $(SOURCES)/$@/*.cfg $(LIBPLUGINS)/
install -m755 $(SOURCE_DIR)/$(NI_NEUTRINO-PLUGINS)/scripts-sh/plugins/$@/$@.sh $(LIBPLUGINS)/
install -m644 $(SOURCE_DIR)/$(NI_NEUTRINO-PLUGINS)/scripts-sh/plugins/$@/$@.cfg $(LIBPLUGINS)/
logo-addon: $(SOURCE_DIR)/$(NI_LOGO-STUFF) $(LIBPLUGINS)
install -m755 $(SOURCE_DIR)/$(NI_LOGO-STUFF)/logo-addon/*.sh $(LIBPLUGINS)/

Loading…
Cancel
Save