2007-07-09 12:21:04 +01:00
|
|
|
{config, pkgs}:
|
|
|
|
let
|
2007-11-09 18:49:45 +00:00
|
|
|
cfg = config.services.gw6c;
|
2007-07-09 12:21:04 +01:00
|
|
|
procps = pkgs.procps;
|
|
|
|
gw6cService = import ../services/gw6c {
|
|
|
|
inherit (pkgs) stdenv gw6c coreutils
|
2007-08-08 21:42:25 +01:00
|
|
|
procps upstart iputils gnused
|
2008-03-04 15:30:54 +00:00
|
|
|
gnugrep seccureUser writeScript;
|
2007-11-09 18:49:45 +00:00
|
|
|
username = cfg.username;
|
|
|
|
password = cfg.password;
|
|
|
|
server = cfg.server;
|
|
|
|
keepAlive = cfg.keepAlive;
|
|
|
|
everPing = cfg.everPing;
|
2008-03-04 16:06:33 +00:00
|
|
|
|
|
|
|
seccureKeys = config.security.seccureKeys;
|
2007-07-09 12:21:04 +01:00
|
|
|
};
|
|
|
|
in
|
|
|
|
{
|
|
|
|
name = "gw6c";
|
|
|
|
users = [];
|
|
|
|
groups = [];
|
|
|
|
job = "
|
|
|
|
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
|
|
|
|
";
|
|
|
|
}
|