nixos/deploy-rs: Start container if not running on deploy
This commit is contained in:
parent
502b96996a
commit
d2deabc6b2
@ -58,7 +58,8 @@ let
|
|||||||
path = pkgs.deploy-rs.lib.activate.custom ctrConfig.my.buildAs.container ''
|
path = pkgs.deploy-rs.lib.activate.custom ctrConfig.my.buildAs.container ''
|
||||||
source ${systemdUtil}/bin/systemd-util.sh
|
source ${systemdUtil}/bin/systemd-util.sh
|
||||||
${if c.hotReload then ''
|
${if c.hotReload then ''
|
||||||
if systemctl show -p StatusText systemd-nspawn@${n} | grep -q "Dummy container"; then
|
if (! systemctl show -p ActiveState systemd-nspawn@${n} | grep -q "ActiveState=active") || \
|
||||||
|
systemctl show -p StatusText systemd-nspawn@${n} | grep -q "Dummy container"; then
|
||||||
action=restart
|
action=restart
|
||||||
else
|
else
|
||||||
action=reload
|
action=reload
|
||||||
|
Loading…
Reference in New Issue
Block a user