-
-
Notifications
You must be signed in to change notification settings - Fork 494
-
-
Notifications
You must be signed in to change notification settings - Fork 494
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
DietPi-Service | Stopping a random services will stop NextCloud as well #3740
Comments
Indeed, was reported somewhere else already. I have to think through it since in case of stopped database or redis or php-fpm it makes sense to put Nextcloud into maintenance mode. So how to handle this:
Probably like that is easy and good enough in most cases:
|
Indeed we should keep it simple and just set maintenance mode if MariaDB, Redis or PHP are stopped. That's basically what NextCloud is depending on. (next to a functioning web server). |
Jep. If the webserver is stopped, then only cron via php-cli or php-cli directly can "reach" Nextcloud anyway, and for this no webserver is required. |
Strange, actually starting/stopping a single service should not toggle maintenance mode:
According to what I through I'd know about bash syntax, $index must be empty for this to succeed, regardless if "$command" is "stop" or "restart". This should be the case for the same reason why
Clearer test:
The last test is only checked if the second test is true and ignored if the first test is true.
Here, regardless if the first test is false or the second test is false, the 3rd test is performed in both cases. This is inconsistent. Either the checks must end completely at Separating the bash conditionals behaves as expected:
Made some more checks:
Good to know. Solution is quite easy by separating and by this grouping the checks, but I completely dislike this inconsistency 😄. |
Okay fixed it, i.e. it behaves now like it was intended: 2fd9a87 |
ok it's working on Beta that way. |
Thanks for testing. I hope there are no other cases where things do no behave as expected due to this wrong understood bash behaviour 😅. |
Hi @MichaIng,
I'm opening the report based on 2 forum post.
https://dietpi.com/phpbb/viewtopic.php?f=9&t=7320
https://dietpi.com/phpbb/viewtopic.php?f=11&t=8020
Issue is, that
dietpi-services stop <service>
will stop NextCloud as well, even if the service is not related to NextCloudThe other way around of service going to be
started
.This did not happen on
dietpi-services restart <service>
I guess this is related to this line. But If I'm not mistaken it should happen for start/restart/stop
DietPi/dietpi/dietpi-services
Line 392 in f1cfa3c
The text was updated successfully, but these errors were encountered: