diff --git a/plugins/dynamix.docker.manager/scripts/container_size b/plugins/dynamix.docker.manager/scripts/container_size
index b235633d0..5c5b04321 100755
--- a/plugins/dynamix.docker.manager/scripts/container_size
+++ b/plugins/dynamix.docker.manager/scripts/container_size
@@ -25,6 +25,9 @@ require_once "$docroot/webGui/include/Translations.php";
$unit = ['B','kB','MB','GB','TB','PB','EB','ZB','YB'];
$list = [];
+function done() {
+ write('_DONE_');
+}
function write($message){
$nchan = curl_init();
curl_setopt_array($nchan,[
@@ -75,5 +78,5 @@ foreach ($list as $ct) {
$sum['log'] += $ct['log'];
}
write("
".align(_('Total size'),42).align(autoscale($sum['total'])).align(autoscale($sum['writable'])).autoscale($sum['log'])."\n");
-write('_DONE_');
+done();
?>
diff --git a/plugins/dynamix.plugin.manager/scripts/plugin b/plugins/dynamix.plugin.manager/scripts/plugin
index 1c00c178f..4ec5b860f 100755
--- a/plugins/dynamix.plugin.manager/scripts/plugin
+++ b/plugins/dynamix.plugin.manager/scripts/plugin
@@ -162,6 +162,12 @@ function error_desc($code) {
}
}
+// Signal DONE to caller
+//
+function done() {
+ write('_DONE_');
+}
+
// Function to write either to console (echo) or nchan (curl)
// Default output is console, use optional parameter "nchan" to write to nchan instead
//
@@ -479,7 +485,7 @@ if ($method == 'checkall') {
write("plugin: checking $plugin ...\n");
exec("$cmd check $plugin >/dev/null");
}
- write('_DONE_');
+ done();
exit(0);
}
@@ -507,7 +513,7 @@ if ($method == 'updateall') {
exec("$cmd update $plugin >/dev/null");
}
}
- write('_DONE_');
+ done();
exit(0);
}
@@ -528,7 +534,7 @@ if ($method == 'checkos') {
write("plugin: checking $plugin ...\n");
exec("$cmd check $plugin >/dev/null");
}
- write('_DONE_');
+ done();
exit(0);
}
@@ -655,7 +661,7 @@ if ($method == 'install') {
}
// run hook scripts for post processing
post_hooks();
- write('_DONE_');
+ done();
exit(0);
}
@@ -755,7 +761,7 @@ if ($method == 'update') {
logger("plugin: $plugin updated");
// run hook scripts for post processing
post_hooks();
- write('_DONE_');
+ done();
exit(0);
}
@@ -789,7 +795,7 @@ if ($method == 'remove') {
exec("/usr/local/sbin/update_cron");
// run hook scripts for post processing
post_hooks();
- write('_DONE_');
+ done();
exit(0);
}
diff --git a/plugins/dynamix/scripts/newperms b/plugins/dynamix/scripts/newperms
index 4e07dbae3..127b83221 100755
--- a/plugins/dynamix/scripts/newperms
+++ b/plugins/dynamix/scripts/newperms
@@ -21,6 +21,9 @@
$console = $argv[$argc-1] != 'nchan'; // console or nchan output
if (!$console) unset($argv[$argc-1]); // remove nchan parameter
+function done() {
+ write('_DONE_');
+}
function write($message) {
global $console;
if ($console) {
@@ -73,5 +76,5 @@ $hours = floor($time/3600);
$mins = floor($time/60%60);
$secs = floor($time%60);
write("Completed, elapsed time: ".sprintf('%02d:%02d:%02d', $hours, $mins, $secs)."\n");
-write('_DONE_');
+done();
?>