nixos-module/server/lxc-containers: add restart on failed reload

legacy
Astro 2 years ago
parent 3166d607f5
commit aa5c7377c7

@ -106,7 +106,10 @@ let
active=$(systemctl is-active lxc@$c)
if [[ "$active" = active ]] ; then
echo Activating $c
systemctl reload lxc@$c
systemctl reload lxc@$c || (
echo Reload failed. Restarting $c
systemctl restart lxc@$c
)
else
echo Starting $c
systemctl start lxc@$c

Loading…
Cancel
Save