Webmin

Having issues with your DietPi installation or found a bug? Post it here.
User avatar
MichaIng
Site Admin
Posts: 2780
Joined: Sat Nov 18, 2017 6:21 pm

Re: Webmin

Post by MichaIng »

For the systemd restart feature we'd need to find the exit code or signal when an internal restart is done. This can then be used to trigger a systemd restart conditionally. Otherwise we'd either prevent an intended stop or have a restart loop on failure. With a wrapper script it's actually the same, but we have more tools like checking for the process that performs the restart. I'll run some tests next week.
User avatar
Joulinar
Posts: 4205
Joined: Sat Nov 16, 2019 12:49 am

Re: Webmin

Post by Joulinar »

well adding StartLimitBurst should prevent uncontrolled restart loops and stop the service after a specified attempts, isn't it?
Pls let us know if a solution is working. This could help others if they hit by similar situation. Your DietPi Team
User avatar
MichaIng
Site Admin
Posts: 2780
Joined: Sat Nov 18, 2017 6:21 pm

Re: Webmin

Post by MichaIng »

Jep exactly. It's still not perfect as in cases when users change settings often, frequent restarts may be expected while hitting the limit. But until we find a better solution via exit code or signal, it's an option.
Burgess85
Posts: 8
Joined: Sat Mar 20, 2021 5:03 pm

Re: Webmin

Post by Burgess85 »

Do I need to change anything?
User avatar
Joulinar
Posts: 4205
Joined: Sat Nov 16, 2019 12:49 am

Re: Webmin

Post by Joulinar »

Well you could try to adjust your webmin service file as follow. It would be a workaround until a final solution was found

Code: Select all

[Unit]
Description=Webmin (DietPi)

StartLimitIntervalSec=500
StartLimitBurst=5

[Service]
Restart=always
RestartSec=5s
Type=forking
ExecStart=/etc/webmin/start
ExecStop=/etc/webmin/stop

[Install]
WantedBy=multi-user.target
Pls let us know if a solution is working. This could help others if they hit by similar situation. Your DietPi Team
Burgess85
Posts: 8
Joined: Sat Mar 20, 2021 5:03 pm

Re: Webmin

Post by Burgess85 »

Did you have an update please?
User avatar
Joulinar
Posts: 4205
Joined: Sat Nov 16, 2019 12:49 am

Re: Webmin

Post by Joulinar »

as stated above, you can adjust your service file as workaround.
Pls let us know if a solution is working. This could help others if they hit by similar situation. Your DietPi Team
Burgess85
Posts: 8
Joined: Sat Mar 20, 2021 5:03 pm

Re: Webmin

Post by Burgess85 »

Sorry where do I find it?
User avatar
Joulinar
Posts: 4205
Joined: Sat Nov 16, 2019 12:49 am

Re: Webmin

Post by Joulinar »

you can do it on a drop-in config for webmin service

Code: Select all

nano /etc/systemd/system/webmin.service.d/dietpi-services_edit.conf
and add

Code: Select all

[Unit]
StartLimitIntervalSec=500
StartLimitBurst=5

[Service]
Restart=always
RestartSec=5s
once done

Code: Select all

systemctl daemon-reload
systemctl restart webmin.service
Pls let us know if a solution is working. This could help others if they hit by similar situation. Your DietPi Team
Post Reply