summaryrefslogtreecommitdiff
path: root/src/Propellor/Property/SiteSpecific/JoeySites.hs
diff options
context:
space:
mode:
authorJoey Hess2017-11-17 23:42:01 -0400
committerJoey Hess2017-11-17 23:42:01 -0400
commit677d060b3621305835461d6a2425e94b15379e8f (patch)
treee7212714fe2cb95b3d2d5d1df73b84c0538d662c /src/Propellor/Property/SiteSpecific/JoeySites.hs
parent55c942a211a3709658574b12da0ffdeff8182d9d (diff)
homepower fixes
Diffstat (limited to 'src/Propellor/Property/SiteSpecific/JoeySites.hs')
-rw-r--r--src/Propellor/Property/SiteSpecific/JoeySites.hs12
1 files changed, 8 insertions, 4 deletions
diff --git a/src/Propellor/Property/SiteSpecific/JoeySites.hs b/src/Propellor/Property/SiteSpecific/JoeySites.hs
index 81705e64..0465476d 100644
--- a/src/Propellor/Property/SiteSpecific/JoeySites.hs
+++ b/src/Propellor/Property/SiteSpecific/JoeySites.hs
@@ -912,13 +912,14 @@ alarmClock oncalendar (User user) command = combineProperties "goodmorning timer
homePowerMonitor :: IsContext c => User -> c -> (SshKeyType, Ssh.PubKeyText) -> Property (HasInfo + DebianLike)
homePowerMonitor user ctx sshkey = propertyList "home power monitor" $ props
& Apache.installed
- & Apt.installed ["python", "python-pymodbus"]
+ & Apt.installed ["python", "python-pymodbus", "rrdtool"]
& File.ownerGroup "/var/www/html" user (userGroup user)
& Git.cloned user "git://git.kitenet.net/joey/homepower" d Nothing
- `onChange` buildpoller
+ & buildpoller
& Systemd.enabled servicename
`requires` serviceinstalled
`onChange` Systemd.started servicename
+ & User.inGroup user (Group "dialout")
& Cron.niceJob "homepower upload"
(Cron.Times "1 * * * *") user d rsynccommand
`requires` Ssh.userKeyAt (Just sshkeyfile) user ctx sshkey
@@ -960,14 +961,17 @@ homeRouter :: Property (HasInfo + DebianLike)
homeRouter = propertyList "home router" $ props
& Network.static "wlan0" (IPv4 "10.1.1.1") Nothing
`requires` Network.cleanInterfacesFile
- & Apt.serviceInstalledRunning "hostapd"
- `requires` File.hasContent "/etc/hostapd/hostapd.conf"
+ & Apt.installed ["hostapd"]
+ & File.hasContent "/etc/hostapd/hostapd.conf"
[ "interface=wlan0"
, "ssid=house"
, "hw_mode=g"
, "channel=8"
]
`requires` File.dirExists "/etc/hostapd"
+ `requires` File.hasContent "/etc/default/hostapd"
+ [ "DAEMON_CONF=/etc/hostapd/hostapd.conf" ]
+ `onChange` Service.restarted "hostapd"
& File.hasContent "/etc/resolv.conf"
[ "domain kitenet.net"
, "search kitenet.net"