blob: bebf07630f715e3e2c74114b6e00c1d9fbd2e471 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
|
module Property.Tor where
import Control.Applicative
import Control.Monad
import System.FilePath
import Property
import Property.User
import Utility.SafeCommand
import Utility.Exception
isBridge :: Property
isBridge = fileHasContent "/etc/tor/torrc"
[ "SocksPort 0"
, "ORPort 443"
, "BridgeRelay 1"
, "Exitpolicy reject *:*"
] `onChange` restartTor
restartTor :: Property
restartTor = cmdProperty "service" [Param "tor", Param "restart"]
|