2018-12-24 00:56:22 +01:00
|
|
|
#!/bin/bash
|
|
|
|
|
|
|
|
# SHORTCUT COMMANDS you can call as user 'admin' from terminal
|
|
|
|
|
2019-06-30 19:55:18 +02:00
|
|
|
# command: raspiblitz
|
|
|
|
# calls the the raspiblitz mainmenu (legacy)
|
|
|
|
function raspiblitz() {
|
|
|
|
cd /home/admin
|
|
|
|
./00raspiblitz.sh
|
|
|
|
}
|
|
|
|
|
|
|
|
# command: blitz
|
|
|
|
# calls the the raspiblitz mainmenu (shortcut)
|
|
|
|
function blitz() {
|
2019-01-14 16:16:43 +01:00
|
|
|
cd /home/admin
|
2019-04-16 19:55:25 +02:00
|
|
|
./00raspiblitz.sh
|
2019-06-30 17:47:11 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
# command: menu
|
|
|
|
# calls directly the main menu
|
|
|
|
function menu() {
|
|
|
|
cd /home/admin
|
|
|
|
./00mainMenu.sh
|
|
|
|
}
|
|
|
|
|
|
|
|
# command: repair
|
|
|
|
# calls directly the repair menu
|
2019-06-30 19:55:18 +02:00
|
|
|
function repair() {
|
2019-06-30 17:47:11 +02:00
|
|
|
cd /home/admin
|
|
|
|
./98repairMenu.sh
|
2019-12-19 00:23:54 +01:00
|
|
|
}
|
|
|
|
|
2020-01-24 21:46:51 +01:00
|
|
|
# command: hdmi
|
|
|
|
function hdmi() {
|
|
|
|
echo "# SWITCHING VIDEO OUTPUT TO --> HDMI"
|
2020-01-24 21:55:54 +01:00
|
|
|
sudo /home/admin/config.scripts/blitz.lcd.sh hdmi on
|
2020-01-24 21:46:51 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
# command: lcd
|
|
|
|
function lcd() {
|
|
|
|
echo "# SWITCHING VIDEO OUTPUT TO --> LCD"
|
2020-01-24 21:55:54 +01:00
|
|
|
sudo /home/admin/config.scripts/blitz.lcd.sh hdmi off
|
2020-01-24 21:46:51 +01:00
|
|
|
}
|
|
|
|
|
2019-12-19 00:29:53 +01:00
|
|
|
# command: manage
|
|
|
|
function manage() {
|
2019-12-19 00:23:54 +01:00
|
|
|
if [ $(cat /mnt/hdd/raspiblitz.conf 2>/dev/null | grep -c "lndmanage=on") -eq 1 ]; then
|
2019-12-19 00:29:53 +01:00
|
|
|
cd /home/admin/lndmanage
|
2019-12-19 00:23:54 +01:00
|
|
|
source venv/bin/activate
|
2020-01-22 02:52:15 +01:00
|
|
|
echo "NOTICE: Needs at least one active channel to run without error."
|
2019-12-19 00:29:53 +01:00
|
|
|
echo "to exit (venv) enter ---> deactivate"
|
2019-12-19 00:23:54 +01:00
|
|
|
lndmanage
|
|
|
|
else
|
2020-01-23 17:48:11 +01:00
|
|
|
echo "lndmanage not installed - to install run:"
|
2019-12-19 00:23:54 +01:00
|
|
|
echo "sudo /home/admin/config.scripts/bonus.lndmanage.sh on"
|
|
|
|
fi
|
|
|
|
}
|
|
|
|
|
|
|
|
|