diff --git a/conf/restarter b/conf/restarter new file mode 100644 index 0000000..f38fc86 --- /dev/null +++ b/conf/restarter @@ -0,0 +1,2 @@ +# sudoers entry for package restarter +www-data unterdemradar=NOPASSWD: /usr/bin/systemctl restart minidlna.service diff --git a/src/index.html b/src/index.html index 5cd5636..c05925f 100644 --- a/src/index.html +++ b/src/index.html @@ -20,8 +20,8 @@ console.log(query); + -
diff --git a/src/restarter.php b/src/restarter.php index 3fafaa2..3282145 100644 --- a/src/restarter.php +++ b/src/restarter.php @@ -14,6 +14,10 @@ } // execute shell command exec($command, $output, $exitcode); - echo "Output is
", join("
", $output), "

"; - echo "Exit code is ", $exitcode; + echo "Output is
", join("
", $output), "

";//DEBUG + if ( $exitcode == "0" ) { + echo "Success"; + } else { + echo "Command failed with exit code", $exitcode; + } ?>