Am 22.11.2017 um 23:02 schrieb Gena Makhomed:
On 22.11.2017 23:27, Reindl Harald wrote:
or just remove the pid-file stuff from the systemd-unit, systemd don't
need it really
pid-file need for service reload and service stop
nonsense - if maintain a ton of production servers from web/proxy over
mail and what not else and none hase a PID file config in the systemd-unit
please read how systemd works
[root@srv-rhsoft:/etc/systemd/system]$ cat
/etc/systemd/system/smb.service | grep -i type
Type=forking
[root@srv-rhsoft:/etc/systemd/system]$
[root@srv-rhsoft:/etc/systemd/system]$ cat
/etc/systemd/system/smb.service | grep -i pid
ExecReload=/usr/bin/kill -HUP $MAINPID
[root@srv-rhsoft:/etc/systemd/system]$
[root@srv-rhsoft:/etc/systemd/system]$ systemctl status smb
? smb.service - Samba SMB Daemon
Loaded: loaded (/etc/systemd/system/smb.service; enabled; vendor
preset: disabled)
Active: active (running) since Wed 2017-11-22 16:35:55 CET; 6h ago
Process: 977 ExecStart=/usr/sbin/smbd -D (code=exited, status=0/SUCCESS)
Main PID: 1197 (smbd)
Tasks: 4 (limit: 512)
CGroup: /system.slice/smb.service
??1197 /usr/sbin/smbd -D
??1198 /usr/sbin/smbd -D
??1199 /usr/sbin/smbd -D
??1257 /usr/sbin/smbd -D
[root@srv-rhsoft:/etc/systemd/system]$ systemctl reload smb
[root@srv-rhsoft:/etc/systemd/system]$ systemctl status smb
? smb.service - Samba SMB Daemon
Loaded: loaded (/etc/systemd/system/smb.service; enabled; vendor
preset: disabled)
Active: active (running) since Wed 2017-11-22 16:35:55 CET; 6h ago
Process: 30751 ExecReload=/usr/bin/kill -HUP $MAINPID (code=exited,
status=0/SUCCESS)
Process: 977 ExecStart=/usr/sbin/smbd -D (code=exited, status=0/SUCCESS)
Main PID: 1197 (smbd)
Tasks: 4 (limit: 512)
CGroup: /system.slice/smb.service
??1197 /usr/sbin/smbd -D
??1198 /usr/sbin/smbd -D
??1199 /usr/sbin/smbd -D
??1257 /usr/sbin/smbd -D
Nov 22 16:35:53 srv-rhsoft.rhsoft.net systemd[1]: Starting Samba SMB
Daemon...
Nov 22 16:35:55 srv-rhsoft.rhsoft.net systemd[1]: Started Samba SMB Daemon.
Nov 22 16:35:55 srv-rhsoft.rhsoft.net smbd[1197]: [2017/11/22
16:35:55.447806, 0] ../lib/util/become_daemon.c:124(daemon_ready)
Nov 22 16:35:55 srv-rhsoft.rhsoft.net smbd[1197]: STATUS=daemon 'smbd'
finished starting up and ready to serve connections
Nov 22 23:29:18 srv-rhsoft.rhsoft.net systemd[1]: Reloading Samba SMB
Daemon.
Nov 22 23:29:18 srv-rhsoft.rhsoft.net systemd[1]: Reloaded Samba SMB Daemon.
_______________________________________________
systemd-devel mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/systemd-devel