mirror of
https://github.com/unraid/webgui.git
synced 2026-04-23 18:48:49 -05:00
Make docker_load script start/stop event driven
This commit is contained in:
@@ -17,9 +17,6 @@ Markdown="false"
|
||||
* all copies or substantial portions of the Software.
|
||||
*/
|
||||
?>
|
||||
<?
|
||||
if (!exec("pgrep docker_load")) exec("$docroot/plugins/dynamix.docker.manager/scripts/docker_load >/dev/null 2>&1 &");
|
||||
?>
|
||||
<link type="text/css" rel="stylesheet" href="<?autov('/webGui/styles/jquery.ui.css')?>">
|
||||
<link type="text/css" rel="stylesheet" href="<?autov('/webGui/styles/jquery.switchbutton.css')?>">
|
||||
<style>
|
||||
|
||||
@@ -0,0 +1,7 @@
|
||||
#!/bin/bash
|
||||
# daemonize the 'docker_load' script
|
||||
DAEMON="/usr/local/emhttp/plugins/dynamix.docker.manager/scripts/docker_load"
|
||||
if [[ "$(pgrep -f $DAEMON)" == "" ]]; then
|
||||
logger "Starting $DAEMON"
|
||||
$DAEMON &>/dev/null &
|
||||
fi
|
||||
@@ -0,0 +1,7 @@
|
||||
#!/bin/bash
|
||||
# stop docker_load daemon
|
||||
DAEMON="docker_load"
|
||||
if [[ "$(pgrep $DAEMON)" != "" ]]; then
|
||||
logger "Stopping $DAEMON"
|
||||
pkill $DAEMON
|
||||
fi
|
||||
Reference in New Issue
Block a user