Score:0

How to start webmin (service) on centos 9 stream on boot

cn flag

I have just installed a CentOS 9 Stream VM. Next, I have installed Webmin on the VM (using the RPM method). All is good - until I reboot the VM then Webmin is not running...

It seems that webmin is not started as a service. It has installed the "old fashioned" webmin in /etc/init.d/

If I run /etc/webmin/start manually Webmin starts up correctly.

I have tried to find out if I should start a service in another way - but as far as I can find out it should also start the "old" init.d services...

Does anyone know how I should do this?

in flag
Did you check if it didn't also install a systemd unit? (`systemctl list-units -t service`). Most probably it only needs to get enabled.
John Dalsgaard avatar
cn flag
Hi Gerald, it didn't - and it also doesn't show up as a service in webmin....
r3d avatar
in flag
r3d
Have you enabled start at boot time? you can refer to Webmin Configuration --> https://doxfer.webmin.com/Webmin/Webmin_Configuration
Score:0
us flag

I solved this by removing /etc/init.d/webmin and placing a file webmin.service in /usr/lib/systemd/system/.

webmin.service:

    [Unit]
    Description=Webmin Administration Tool
    After=network.target remote-fs.target nss-lookup.target
    ConditionFileNotEmpty=/etc/webmin/config
    ConditionFileNotEmpty=/etc/webmin/miniserv.conf

    [Service]
    RemainAfterExit=yes
    KillMode=mixed
    # Webmin is exiting with 1 on SIGTERM
    SuccessExitStatus=1
    ExecStart=/usr/libexec/webmin/miniserv.pl /etc/webmin/miniserv.conf
    PIDFile=/var/run/webmin.pid
    Environment="PERLLIB=/usr/libexec/webmin" LANG=
    ExecReload=/bin/kill -USR1 $MAINPID

    [Install]
    WantedBy=multi-user.target 

webmin can then be enabled using systemctl:

    systemctl enable webmin
John Greene avatar
cn flag
Whoa! Do not modify `/usr/lib/systemd`; instead, place new or replacing service unit file such as `webmin.service` into `/etc/systemd/system`. Putting things into /usr/lib/systemd will only get blown away at next package upgrade.
mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.