bstansell / conserver

Logged, multi-user access to device consoles
https://www.conserver.com/
BSD 3-Clause "New" or "Revised" License
129 stars 38 forks source link

Modify init.d script to facilitate systemd use of reload #62

Open owendelong opened 3 years ago

owendelong commented 3 years ago
root# systemctl reload conserver-server
Failed to reload conserver-server.service: Job type reload is not applicable for unit conserver-server.service.

I realize that this is not built for systems, but it is possible for the init.d script to be built in such a way as to facilitate this though the systemd adaptation process.

Alternatively, for better or worse, systemd is the reality of modern linux(mostly worse IMHO), so developing full-featured systemd support might be the better option.

UweSauter commented 2 years ago

This is what EPEL provides as Systemd unit file: /usr/lib/systemd/system/conserver.service

[Unit]
Description=Conserver Serial-Port Console Daemon
After=network.target

[Service]
Type=forking
ExecStart=/usr/sbin/conserver -d

[Install]
WantedBy=multi-user.target

It could probably be enhanced to facilitate ExecReload=kill -SIGHUP $MAINPID (as described in systemd.service(5)).

kingspride commented 5 months ago

I stumbled upon this because I wanted to use the conserver config functions of procServ. (it does a reload after adding / updateing a config)

I tried adding ExecReload=kill -SIGHUP $MAINPID to my systemd service file and now it works as expected.

But, I think this is more of an issue for the package maintainers for Debian for example ... https://salsa.debian.org/debian/conserver