Closed greenpau closed 7 years ago
[root@ip-192-168-16-66 ~]# systemctl status pimd
pimd.service - pimd PIM-SM Daemon
Loaded: loaded (/usr/lib/systemd/system/pimd.service; enabled)
Active: active (running) since Mon 2015-05-18 19:20:58 UTC; 1s ago
Process: 3091 ExecStop=/usr/local/sbin/pimd -q (code=exited, status=0/SUCCESS)
Main PID: 3099 (pimd)
CGroup: /system.slice/pimd.service
└─3099 /usr/local/sbin/pimd -c /etc/pimd.conf -digmp_proto pim_jp kernel pim_register
May 18 19:20:58 ip-192-168-16-66 pimd[3099]: 19:20:58.210 RECV 32 bytes IGMP v2 Member Report from 192.168.16.66 to 224.0.0.2
May 18 19:20:58 ip-192-168-16-66 pimd[3099]: 19:20:58.210 Not creating routing entry for LAN scoped group 224.0.0.2
May 18 19:20:58 ip-192-168-16-66 pimd[3099]: 19:20:58.210 RECV 32 bytes IGMP v2 Member Report from 192.168.16.66 to 224.0.0.13
May 18 19:20:58 ip-192-168-16-66 pimd[3099]: 19:20:58.210 Not creating routing entry for LAN scoped group 224.0.0.13
May 18 19:20:58 ip-192-168-16-66 pimd[3099]: 19:20:58.210 RECV 32 bytes IGMP v2 Member Report from 172.17.42.1 to 224.0.0.22
May 18 19:20:58 ip-192-168-16-66 pimd[3099]: 19:20:58.210 Not creating routing entry for LAN scoped group 224.0.0.22
May 18 19:20:58 ip-192-168-16-66 pimd[3099]: 19:20:58.210 RECV 32 bytes IGMP v2 Member Report from 172.17.42.1 to 224.0.0.2
May 18 19:20:58 ip-192-168-16-66 pimd[3099]: 19:20:58.210 Not creating routing entry for LAN scoped group 224.0.0.2
May 18 19:20:58 ip-192-168-16-66 pimd[3099]: 19:20:58.210 RECV 32 bytes IGMP v2 Member Report from 172.17.42.1 to 224.0.0.13
May 18 19:20:58 ip-192-168-16-66 pimd[3099]: 19:20:58.210 Not creating routing entry for LAN scoped group 224.0.0.13
[root@ip-192-168-16-66 ~]#
I currently have no plans of my own to support systemd, but if you send a patch or GitHub pull request I can merge it. Take a look at Debian, the pimd packare there should get systemd support eventually, if it does not already support it.
@troglobit, will take a look at it. Thank you.
The ExecStart line should use -f and the ExecStop line should be deleted IMO.
Admittedly I'm no expert on systemd, but isn't the ExecStop
command called to stop a service? In that case pimd -q
is the way to do it, unless systemd knows the pid and can stop it by itself of course.
Unfortunately nobody at debian converted init script to systemd and that's why pimd is no longer available on Debian 8. I installed it manually, then added the following unit.
[Unit]
Description=pimd PIM-SM Daemon
After=syslog.target network.target
ConditionPathExists=/etc/pimd.conf
Documentation=man:pimd
[Service]
Type=forking
EnvironmentFile=-/etc/default/pimd
ExecStart=/usr/local/sbin/pimd -c /etc/pimd.conf
ExecStop=/usr/local/sbin/pimd -q
[Install]
WantedBy=multi-user.target
I would also like to contact debian pimd mentainer for this issue, anyone knows how?
I haven't heard back from @bobek in a while now. Been meaning to get back in touch with him, but I suspect we will have to build our own packages for Debian/Ubuntu for the time being.
Thank you @malakudi for the unit sample! If I get some time over I'll try to read up on the requirements for debian/
packaging of systemd files and add it, unless someone else beats me to it and submits a pull request.
Would be great if we could bring the debian/
directory up to form, that would help pimd being included in Debian/Ubuntu again.
ExecStop is for services that fork or otherwise need help shutting down. pimd should work fine as a "simple" (non-forking) service, and systemd can them send it SIGTERM all by itself, as long as it's started with -f. On Sep 10, 2015 2:48 PM, "Joachim Nilsson" notifications@github.com wrote:
Admittedly I'm no expert on systemd, but isn't the ExecStop command called to stop a service? In that case pimd -q is the way to do it, unless systemd knows the pid and can stop it by itself of course.
— Reply to this email directly or view it on GitHub https://github.com/troglobit/pimd/issues/41#issuecomment-139388464.
I prefer running without "-f" as I consider this a "debug" option. But yes, if you change Type=simple and ExecStart=/usr/local/sbin/pimd -f -c /etc/pimd.conf , then ExecStop is not needed.
If packaged for debian8 inclusion, it should be ExecStart=/usr/sbin/pimd -c /etc/pimd.conf (removing local)
@malakudi Why do you consider it a debug option? Many other initd implementations than systemd use this feature of running a process in the foreground.
Just personal habbit I guess ... I prefer running detached - I guess I am still thinking with the sysvinit way :-)
@malakudi Ah, OK! :smiley:
Just curious, always good to know how people reason. I was considering updating the documentation at the same time as adding the systemd unit file, so this point might be worth stressing. Thanks!
Requesting addition of systemd service file and environments file.
Environments:
Service file:
Any thoughts?