2007-07-09 11:21:04 +00:00
|
|
|
{config, pkgs}:
|
|
|
|
let
|
2008-07-23 14:13:27 +00: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 14:13:27 +00:00
|
|
|
seccureKeys = config.security.seccureKeys;
|
2008-04-08 21:41:01 +00:00
|
|
|
|
2008-07-23 14:13:27 +00:00
|
|
|
waitPingableBroker = cfg.waitPingableBroker;
|
|
|
|
};
|
2007-07-09 11:21:04 +00:00
|
|
|
in
|
|
|
|
{
|
2008-07-23 14:13:27 +00:00
|
|
|
name = "gw6c";
|
|
|
|
users = [];
|
|
|
|
groups = [];
|
|
|
|
job = "
|
2007-07-09 11:21:04 +00: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 21:26:38 +00:00
|
|
|
stop on network-interfaces/stop
|
2007-07-09 11:21:04 +00:00
|
|
|
|
|
|
|
respawn ${gw6cService}/bin/control start
|
|
|
|
";
|
|
|
|
}
|