2007-07-09 11:21:04 +00:00
|
|
|
{config, pkgs}:
|
|
|
|
let
|
2007-11-09 18:49:45 +00:00
|
|
|
cfg = config.services.gw6c;
|
2007-07-09 11:21:04 +00:00
|
|
|
procps = pkgs.procps;
|
|
|
|
gw6cService = import ../services/gw6c {
|
|
|
|
inherit (pkgs) stdenv gw6c coreutils
|
2007-08-08 20:42:25 +00:00
|
|
|
procps upstart iputils gnused
|
|
|
|
gnugrep;
|
2007-11-09 18:49:45 +00:00
|
|
|
username = cfg.username;
|
|
|
|
password = cfg.password;
|
|
|
|
server = cfg.server;
|
|
|
|
keepAlive = cfg.keepAlive;
|
|
|
|
everPing = cfg.everPing;
|
2007-07-09 11:21:04 +00: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 21:26:38 +00:00
|
|
|
stop on network-interfaces/stop
|
2007-07-09 11:21:04 +00:00
|
|
|
|
|
|
|
respawn ${gw6cService}/bin/control start
|
|
|
|
";
|
|
|
|
}
|