From d16d4f60a361711d6dc5726892ccba129dbe27c4 Mon Sep 17 00:00:00 2001 From: jaredb7 Date: Sat, 8 Apr 2023 11:14:04 +1000 Subject: [PATCH] Fix error when restarting the Live Stream service Changed command to use systemctl to restart the icecast2 service, the error wasn't fatal but just made it look like restarting the live stream service had failed. --- homepage/views.php | 8 ++++---- scripts/service_controls.php | 8 ++++---- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/homepage/views.php b/homepage/views.php index 6581111..21304fe 100644 --- a/homepage/views.php +++ b/homepage/views.php @@ -271,10 +271,10 @@ if(isset($_GET['view'])){ } else { $submittedpwd = $_SERVER['PHP_AUTH_PW']; $submitteduser = $_SERVER['PHP_AUTH_USER']; - $allowedCommands = array('sudo systemctl stop livestream.service && sudo /etc/init.d/icecast2 stop', - 'sudo systemctl restart livestream.service && sudo /etc/init.d/icecast2 restart', - 'sudo systemctl disable --now livestream.service && sudo systemctl disable icecast2 && sudo /etc/init.d/icecast2 stop', - 'sudo systemctl enable icecast2 && sudo /etc/init.d/icecast2 start && sudo systemctl enable --now livestream.service', + $allowedCommands = array('sudo systemctl stop livestream.service && sudo systemctl stop icecast2.service', + 'sudo systemctl restart livestream.service && sudo systemctl restart icecast2.service', + 'sudo systemctl disable --now livestream.service && sudo systemctl disable icecast2 && sudo systemctl stop icecast2.service', + 'sudo systemctl enable icecast2 && sudo systemctl start icecast2.service && sudo systemctl enable --now livestream.service', 'sudo systemctl stop web_terminal.service', 'sudo systemctl restart web_terminal.service', 'sudo systemctl disable --now web_terminal.service', diff --git a/scripts/service_controls.php b/scripts/service_controls.php index faf4da4..1888599 100644 --- a/scripts/service_controls.php +++ b/scripts/service_controls.php @@ -25,10 +25,10 @@ function service_status($name) {

Live Audio Stream

- - - - + + + +

Web Terminal