if autostart file already exists don't set multi-installs to automatically autostart

This commit is contained in:
Squidly271 2022-04-07 10:38:41 -04:00
parent df2585633f
commit e20a198e8b
3 changed files with 10 additions and 13 deletions

Binary file not shown.

View File

@ -9,7 +9,7 @@ d9b0dc98ee598d44633341ac199a43e0 ./include/paths.php
71f911a818d88d3d567f8a2898094ee2 ./README.md
79f3093f42415484944e6aa2863ee30a ./scripts/checkForUpdates.php
08c5dc26cf812f7de7d28b26856b04b1 ./scripts/dockerConvert.php
78912ecc112fd6cc6ca49b4b30197ba0 ./scripts/installMulti.php
f69708d36e7f856c0ee95f89b9c68a6b ./scripts/installMulti.php
be74e770cdc8938200fc29580be4e3a1 ./scripts/installMultiPlugin.php
524afab04ca930f59117a846f819fb2f ./scripts/installPluginUpdate.sh
5319e550a7b7a1c216eda8c7f2f0f4ef ./scripts/installUpdate.php

View File

@ -99,20 +99,17 @@ function addCloseButton() {
echo "<br>";
}
}
echo "<br>".tr("Setting installed applications to autostart")."<br>";
$autostartFile = @file("/var/lib/docker/unraid-autostart",FILE_IGNORE_NEW_LINES);
if ( ! $autostartFile ) {
if ( ! is_file("/var/lib/docker/unraid-autostart") ) {
echo "<br>".tr("Setting installed applications to autostart")."<br>";
$autostartFile = array();
}
foreach ($autostartFile as $line) {
$autostart[$line] = true;
}
foreach ($dockers as $docker) {
$autostart[$docker] = true;
}
$autostartFile = implode("\n",array_keys($autostart));
file_put_contents("/var/lib/docker/unraid-autostart",$autostartFile);
foreach ($dockers as $docker) {
$autostart[$docker] = true;
}
$autostartFile = implode("\n",array_keys($autostart));
file_put_contents("/var/lib/docker/unraid-autostart",$autostartFile);
}
if ( $failFlag || !$_GET['plugin']) {
echo "<br>".tr("Docker Application Installation finished")."<br><script>addCloseButton();</script>";
} else {