Can someone explain the following please?
In order for Webmin to run, it needs /var/run/webmin, as the following
extract from webmin.service
shows: [Service] Environment="PERLLIB=/usr/libexec/webmin" ExecStart=/ usr/libexec/webmin/miniserv.pl
/etc/webmin/miniserv.conf ExecStop=/bin/kill
$MAINPID ExecReload=/bin/kill -HUP
$MAINPID PIDFile=/var/run/webmin/miniserv.pid Type=forking Restart=alw
ays RestartSec=2s TimeoutSec=15s TimeoutStopSec=300s
So I create it, and all is good. However, it does not survive over
(re)boot, and I can't see why it should be deleted on shutdown, so I
have to re-create it on startup.
--
Grimble
Registered Linux User #450547
Machine 'Bach' running Plasma 5.27.10 on 6.6.28-desktop-1.mga9 kernel. Mageia release 9 (Official) for x86_64
Can someone explain the following please?
In order for Webmin to run, it needs /var/run/webmin, as the following extract from webmin.service shows:
[Service]
Environment="PERLLIB=/usr/libexec/webmin" ExecStart=/usr/libexec/webmin/miniserv.pl /etc/webmin/miniserv.conf ExecStop=/bin/kill $MAINPID
ExecReload=/bin/kill -HUP $MAINPID
PIDFile=/var/run/webmin/miniserv.pid
Type=forking
Restart=always
RestartSec=2s
TimeoutSec=15s
TimeoutStopSec=300s
So I create it, and all is good. However, it does not survive over
(re)boot, and I can't see why it should be deleted on shutdown, so I
have to re-create it on startup.
On Wed, 08 May 2024 06:51:45 -0400, Grimble <grimble@nomail.afraid.org> wrote:That's interesting about /run - didn't realise it's temporary nature. webmin.conf does not exist in my /usr/lib/tmpfiles.d/
Can someone explain the following please?
In order for Webmin to run, it needs /var/run/webmin, as the following
extract from webmin.service shows:
[Service]
Environment="PERLLIB=/usr/libexec/webmin"
ExecStart=/usr/libexec/webmin/miniserv.pl /etc/webmin/miniserv.conf
ExecStop=/bin/kill $MAINPID
ExecReload=/bin/kill -HUP $MAINPID
PIDFile=/var/run/webmin/miniserv.pid
Type=forking
Restart=always
RestartSec=2s
TimeoutSec=15s
TimeoutStopSec=300s
So I create it, and all is good. However, it does not survive over
(re)boot, and I can't see why it should be deleted on shutdown, so I
have to re-create it on startup.
# file /var/run
/var/run: symbolic link to ../run
The /run directory is the mount point for a tmpfs file system created in
ram
only. It is not supposed to survive a reboot.
# mount|grep 'run '
tmpfs on /run type tmpfs (rw,nosuid,nodev,noexec,mode=755,inode64)
The directories and some files are created at boot as specified in conf files
in /usr/lib/tmpfiles.d/ or /etc/tmpfiles.d/
In Mageia 9 ...
# cat /usr/lib/tmpfiles.d/webmin.conf
d /run/webmin 0700 root bin -
After installing webmin and rebooting ...
# systemctl status webmin.service
○ webmin.service - Webmin server daemon
Loaded: loaded (/usr/lib/systemd/system/webmin.service; disabled; preset: disabled)
Active: inactive (dead)
[root@x9v ~]# systemctl enable webmin.service
Synchronizing state of webmin.service with SysV service script with /usr/lib/systemd/systemd-sysv-install.
Executing: /usr/lib/systemd/systemd-sysv-install enable webmin
Created symlink
/etc/systemd/system/multi-user.target.wants/webmin.service → /usr/lib/systemd/system/webmin.service.
[root@x9v ~]# systemctl start webmin.service
[root@x9v ~]# systemctl status webmin.service
● webmin.service - Webmin server daemon
Loaded: loaded (/usr/lib/systemd/system/webmin.service; enabled; preset: disabled)
Active: active (running) since Wed 2024-05-08 09:58:05 EDT; 3s ago
Process: 24558 ExecStart=/usr/share/webmin/miniserv.pl /etc/webmin/miniserv.conf (code=exited, status=0/SUCCESS)
Main PID: 24561 (miniserv.pl)
Tasks: 4 (limit: 4690)
Memory: 189.3M
CPU: 2.446s
CGroup: /system.slice/webmin.service
├─24561 /usr/bin/perl /usr/share/webmin/miniserv.pl
/etc/webmin/miniserv.conf
├─24562 /usr/share/webmin/webmincron/webmincron.pl
├─24578 sh -c "urpmq -f --list 2>/dev/null"
└─24579 /usr/bin/perl /bin/urpmq -f --list
May 08 09:58:02 x9v.hodgins.homeip.net systemd[1]: Starting webmin.service...
May 08 09:58:03 x9v.hodgins.homeip.net perl[24558]:
pam_unix(webmin:auth): authentication failure; logname= uid=0 euid=0
tty= ruser= rhost= user=root
May 08 09:58:05 x9v.hodgins.homeip.net webmin[24558]: Webmin starting
May 08 09:58:05 x9v.hodgins.homeip.net systemd[1]: Started webmin.service.
Once it's been enabled, then after a reboot it's starting ok here.
Regards, Dave Hodgins
That's interesting about /run - didn't realise it's temporary nature. webmin.conf does not exist in my /usr/lib/tmpfiles.d/
/etc/tmpfiles.d/ is empty
I've created webmin.conf as per your cat output, and I'll check after
the next reboot.
Thanks.
On Wed, 08 May 2024 11:40:39 -0400, Grimble <grimble@nomail.afraid.org> wrote:
That's interesting about /run - didn't realise it's temporary nature.
webmin.conf does not exist in my /usr/lib/tmpfiles.d/
/etc/tmpfiles.d/ is empty
I've created webmin.conf as per your cat output, and I'll check after
the next reboot.
Thanks.
/etc/tmpfiles.d/ is intended for temp file creation for packages from
places
other then Mageia, or as a place to override settings used by Mageia packages.
It's empty unless you choose to create something there.
Did you install webmin from Mageia?No, from the webmin site and I always update from within webmin itself
# rpm -q webmin
webmin-2.013-1.mga9
# rpm -ql webmin|grep tmpfiles
/usr/lib/tmpfiles.d/webmin.conf
Regards, Dave Hodgins
No, from the webmin site and I always update from within webmin itself
Sysop: | Luis Silva |
---|---|
Location: | Lisbon |
Users: | 763 |
Nodes: | 10 (0 / 10) |
Uptime: | 179:36:17 |
Calls: | 111 |
Files: | 46,971 |
Messages: | 11,214 |