2007-07-09 12:21:04 +01:00
|
|
|
{config, pkgs}:
|
|
|
|
let
|
2008-07-23 15:13:27 +01:00
|
|
|
cfg = config.services.gw6c;
|
|
|
|
procps = pkgs.procps;
|
|
|
|
gw6cService = import ../services/gw6c {
|
|
|
|
inherit (pkgs) stdenv gw6c coreutils
|
|
|
|
procps upstart iputils gnused
|
|
|
|
gnugrep seccureUser writeScript;
|
|
|
|
username = cfg.username;
|
|
|
|
password = cfg.password;
|
|
|
|
server = cfg.server;
|
|
|
|
keepAlive = cfg.keepAlive;
|
|
|
|
everPing = cfg.everPing;
|
2008-03-04 16:06:33 +00:00
|
|
|
|
2008-07-23 15:13:27 +01:00
|
|
|
seccureKeys = config.security.seccureKeys;
|
2008-04-08 22:41:01 +01:00
|
|
|
|
2008-07-23 15:13:27 +01:00
|
|
|
waitPingableBroker = cfg.waitPingableBroker;
|
|
|
|
};
|
2007-07-09 12:21:04 +01:00
|
|
|
in
|
|
|
|
{
|
2008-07-23 15:13:27 +01:00
|
|
|
name = "gw6c";
|
|
|
|
users = [];
|
|
|
|
groups = [];
|
|
|
|
job = "
|
2007-07-09 12:21:04 +01:00
|
|
|
description \"Gateway6 client\"
|
|
|
|
|
2008-01-11 06:36:15 +00:00
|
|
|
start on ${ if cfg.autorun then "network-interfaces/started" else "never" }
|
2007-08-02 22:26:38 +01:00
|
|
|
stop on network-interfaces/stop
|
2007-07-09 12:21:04 +01:00
|
|
|
|
|
|
|
respawn ${gw6cService}/bin/control start
|
|
|
|
";
|
|
|
|
}
|