summaryrefslogtreecommitdiff
path: root/src/Propellor/Property/SiteSpecific/JoeySites.hs
diff options
context:
space:
mode:
authorJoey Hess2018-05-29 15:11:55 -0400
committerJoey Hess2018-05-29 15:11:55 -0400
commit56a0503605c9cfb4d3f200747787d893062e445f (patch)
treecda1c40115362c0d662d3bdbad2c5995365c7a95 /src/Propellor/Property/SiteSpecific/JoeySites.hs
parent7191bc66146ca1556d77911e53fe484c26195ac1 (diff)
propellor spin
Diffstat (limited to 'src/Propellor/Property/SiteSpecific/JoeySites.hs')
-rw-r--r--src/Propellor/Property/SiteSpecific/JoeySites.hs20
1 files changed, 20 insertions, 0 deletions
diff --git a/src/Propellor/Property/SiteSpecific/JoeySites.hs b/src/Propellor/Property/SiteSpecific/JoeySites.hs
index ceee7bf3..ff2fab79 100644
--- a/src/Propellor/Property/SiteSpecific/JoeySites.hs
+++ b/src/Propellor/Property/SiteSpecific/JoeySites.hs
@@ -920,6 +920,9 @@ homePower user hosts ctx sshkey = propertyList "home power" $ props
& Systemd.enabled setupservicename
`requires` setupserviceinstalled
`onChange` Systemd.started setupservicename
+ & Systemd.enabled watchdogservicename
+ `requires` watchdogserviceinstalled
+ `onChange` Systemd.started watchdogservicename
& Systemd.enabled pollerservicename
`requires` pollerserviceinstalled
`onChange` Systemd.started pollerservicename
@@ -991,6 +994,22 @@ homePower user hosts ctx sshkey = propertyList "home power" $ props
, "[Install]"
, "WantedBy=multi-user.target"
]
+ watchdogservicename = "homepower-watchdog"
+ watchdogservicefile = "/etc/systemd/system/" ++ watchdogservicename ++ ".service"
+ watchdogserviceinstalled = watchdogservicefile `File.hasContent`
+ [ "[Unit]"
+ , "Description=home power watchdog"
+ , ""
+ , "[Service]"
+ , "ExecStart=" ++ d ++ "/watchdog"
+ , "WorkingDirectory=" ++ d
+ , "User=root"
+ , "Group=root"
+ , "Restart=always"
+ , ""
+ , "[Install]"
+ , "WantedBy=multi-user.target"
+ ]
setupservicename = "homepower-setup"
setupservicefile = "/etc/systemd/system/" ++ setupservicename ++ ".service"
setupserviceinstalled = setupservicefile `File.hasContent`
@@ -1126,6 +1145,7 @@ laptopSoftware = Apt.installed
, "w3m", "sm", "weechat"
, "borgbackup", "wipe", "smartmontools", "libgfshare-bin"
, "units"
+ , "virtualbox", "qemu-kvm"
]
`requires` baseSoftware
`requires` devSoftware