raspiblitz/home.admin/_commands.sh

47 lines
927 B
Bash
Raw Normal View History

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() {
cd /home/admin
2019-04-16 18:55:25 +01: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
}
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
2019-12-19 00:29:53 +01:00
echo "to exit (venv) enter ---> deactivate"
2019-12-19 00:23:54 +01:00
lndmanage
else
echo "lndmanage not install - to install run:"
echo "sudo /home/admin/config.scripts/bonus.lndmanage.sh on"
fi
}