Restarting systemd instances on package upgrades

Jan Rękorajski baggins at pld-linux.org
Wed Mar 25 11:09:47 CET 2015


On Wed, 25 Mar 2015, Mariusz Mazur wrote:

> Let's take openvpn as an example. With old-style init.d scripts, a package 
> upgrade meant a service restart openvpn, which rebooted all tunnels. Openvpn 
> with systemd init scripts runs multiple openvpn at tunnelX.service instances.
> 
> What's the magic rpm macro to run that reboots all of those on package 
> upgrade?

There is a How To in sysconfig file:

# On systems running systemd after updating the list below you have to
# restart systemd to regenerate openvpn at TUNNEL.service services
# (systemctl --system daemon-reload), stop and start openvpn.target when
# removing elements from list or restart openvpn.target when only adding
# elements (systemctl stop openvpn.target / systemctl restart
# openvpn.target).

-- 
Jan Rękorajski                    | PLD/Linux
SysAdm | baggins<at>pld-linux.org | http://www.pld-linux.org/


More information about the pld-devel-en mailing list