Skip to content

Commit

Permalink
Call restart instead
Browse files Browse the repository at this point in the history
  • Loading branch information
iliajie committed Jul 4, 2022
1 parent 4d097b9 commit 034d4e6
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion makerpm.pl
Original file line number Diff line number Diff line change
Expand Up @@ -184,7 +184,7 @@
chmod 600 /tmp/.webmin/usermin-setup.out
rm -f /var/lock/subsys/usermin
if [ "\$inetd" != "1" ]; then
/etc/usermin/start >/dev/null 2>&1 </dev/null
/etc/usermin/restart >/dev/null 2>&1 </dev/null
if [ "\$?" != "0" ]; then
echo "error: Usermin server cannot be started. It is advised to start it manually\n by running \\"/etc/usermin/restart-by-force-kill\\" command"
fi
Expand Down

6 comments on commit 034d4e6

@jcameron
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Won't this fail to start Usermin if it's not currently running?

@iliajie
Copy link
Collaborator Author

@iliajie iliajie commented on 034d4e6 Jul 5, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No, neither for old systems nor for new. As old systems with new restart will call ../.stop-init and ../.start-init, while systemd systems don't care if you call restart on stopped service.

@jcameron
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ok .. I will do one more test just to be sure.

@iliajie
Copy link
Collaborator Author

@iliajie iliajie commented on 034d4e6 Jul 5, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Great! Thank you!

@jcameron
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

FYI, this is a change in behavior from older Webmin/Usermin, where the restart script would only do the start if the server was running previously. But I suppose that's OK..

@iliajie
Copy link
Collaborator Author

@iliajie iliajie commented on 034d4e6 Jul 5, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, I am aware as this is a change in behaviour. However, back few months ago, when fixing it the first time, I didn't like that old restart was failing if the service was stopped. It was pretty unconventional, so I thought that changing it would be beneficial.

But I suppose that's OK..

Yeah, perfectly. Thanks!

Please sign in to comment.