diff --git a/70/LastHeard-Dashboard-Multislot-Enhanced/Multi-LH-DMR-NX8048K070_011.HMI b/70/LastHeard-Dashboard-Multislot-Enhanced/Multi-LH-DMR-NX8048K070_011.HMI index f71ab07..6c09887 100755 Binary files a/70/LastHeard-Dashboard-Multislot-Enhanced/Multi-LH-DMR-NX8048K070_011.HMI and b/70/LastHeard-Dashboard-Multislot-Enhanced/Multi-LH-DMR-NX8048K070_011.HMI differ diff --git a/70/LastHeard-Dashboard-Multislot-Enhanced/Multi-LH-DMR-NX8048K070_011.tft b/70/LastHeard-Dashboard-Multislot-Enhanced/Multi-LH-DMR-NX8048K070_011.tft index 98191e0..10396a9 100755 Binary files a/70/LastHeard-Dashboard-Multislot-Enhanced/Multi-LH-DMR-NX8048K070_011.tft and b/70/LastHeard-Dashboard-Multislot-Enhanced/Multi-LH-DMR-NX8048K070_011.tft differ diff --git a/70/LastHeard-Dashboard-Multislot-Enhanced/linux/README.md b/70/LastHeard-Dashboard-Multislot-Enhanced/linux/README.md new file mode 100644 index 0000000..56520ff --- /dev/null +++ b/70/LastHeard-Dashboard-Multislot-Enhanced/linux/README.md @@ -0,0 +1,72 @@ +# Useful files to keep on your Raspberry Pi + +Use these files as examples and modify them to fit your needs. + +Place the executable files in `/usr/local/sbin` and save `index.txt` as +`/root/index.html`. + +## index.txt + +This file contains the website that is shown when you stop the dashboard. It gets +copied into the webroot of your webserver -- make sure your webserver reads +`index.html` files **before** `index.php` files. + +## dashboard + +Executable file. Make sure to `chmod +x` this file. + +Start or stop the dashboard with this command. This toggles the systemd service + +- php7.3-fpm.service + +Usage: + +``` +/usr/local/sbin/dashboard {on|off} +``` + +## hotspot + +Executable file. Make sure to `chmod +x` this file. + +Start or stop your hotspot. This toggles the systemd services + +- mmdvmhost.timer +- mmdvmhost.service + +Additionally it starts or stops the dashboard command mentioned above. + +Usage: + +``` +/usr/local/sbin/hotspot {on|off} +``` + +### Start and stop the hotspot via Cron + +Place these lines in your `/etc/crontab` to automatically start and/or stop +your hotspot. + +``` +30 6 * * 1-5 root /usr/local/sbin/hotspot off +0 18 * * 1-5 root /usr/local/sbin/hotspot on +``` + +That might stop the hotspot at 6:30 and start it again at 18:00, Monday to Friday. + +## shrinklog + +Executable file. Make sure to `chmod +x` this file. + +This command shrinks the MMDVMHost log file to a limited number of important +lines. + +The code of this was primarily taken from [Pi-Star][shrinklog] and modified. + +[shrinklog]: https://github.com/AndyTaylorTweet/Pi-Star_Binaries_sbin/blob/master/pistar-hourly.cron + +Usage: + +``` +/usr/local/sbin/shrinklog +``` \ No newline at end of file diff --git a/70/LastHeard-Dashboard-Multislot-Enhanced/linux/dashboard b/70/LastHeard-Dashboard-Multislot-Enhanced/linux/dashboard new file mode 100644 index 0000000..2913bbc --- /dev/null +++ b/70/LastHeard-Dashboard-Multislot-Enhanced/linux/dashboard @@ -0,0 +1,26 @@ +#!/bin/bash + +if [ "$EUID" -ne 0 ] + then echo "root privileges needed. Aborting." + exit +fi + +case "$1" in + start|on) + echo -n "Starting the web dashboard..." + systemctl start php7.3-fpm.service + rm -f /var/www/html/index.html + echo " OK" + ;; + + stop|off) + echo -n "Stopping the web dashboard..." + cp -a /root/index.html /var/www/html/index.html + systemctl stop php7.3-fpm.service + echo " OK" + ;; + + *) + echo $"Usage: $0 {start|stop}" + exit 1 +esac diff --git a/70/LastHeard-Dashboard-Multislot-Enhanced/linux/hotspot b/70/LastHeard-Dashboard-Multislot-Enhanced/linux/hotspot new file mode 100644 index 0000000..a648d48 --- /dev/null +++ b/70/LastHeard-Dashboard-Multislot-Enhanced/linux/hotspot @@ -0,0 +1,27 @@ +#!/bin/bash + +if [ "$EUID" -ne 0 ] + then echo "root privileges needed. Aborting." + exit 1 +fi + +case "$1" in + on) + systemctl start mmdvmhost.timer + systemctl start mmdvmhost.service + /usr/local/sbin/dashboard on + ;; + + off) + systemctl stop mmdvmhost.timer + systemctl stop mmdvmhost.service + /usr/local/sbin/dashboard off + ;; + help) + echo "$(basename $0)" + echo " Enable or disable systemd services for MMDVMHost" + ;; + *) + echo "usage: $(basename $0) [ on | off ]" + exit 1 +esac diff --git a/70/LastHeard-Dashboard-Multislot-Enhanced/linux/index.txt b/70/LastHeard-Dashboard-Multislot-Enhanced/linux/index.txt new file mode 100644 index 0000000..08fc6ce --- /dev/null +++ b/70/LastHeard-Dashboard-Multislot-Enhanced/linux/index.txt @@ -0,0 +1,35 @@ + +
+ + + + + +The dashboard is not available right now, please try
+ again later!
+ reload this page
+