2007-07-09 11:21:04 +00:00
|
|
|
{config, pkgs}:
|
|
|
|
let
|
|
|
|
getCfg = option: config.get ["services" "gw6c" option];
|
|
|
|
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-07-09 11:21:04 +00:00
|
|
|
username = getCfg "username";
|
|
|
|
password = getCfg "password";
|
|
|
|
server = getCfg "server";
|
2007-08-08 20:42:25 +00:00
|
|
|
keepAlive = getCfg "keepAlive";
|
2007-07-09 11:21:04 +00:00
|
|
|
};
|
|
|
|
in
|
|
|
|
{
|
|
|
|
name = "gw6c";
|
|
|
|
users = [];
|
|
|
|
groups = [];
|
|
|
|
job = "
|
|
|
|
description \"Gateway6 client\"
|
|
|
|
|
2007-08-02 21:26:38 +00:00
|
|
|
start on network-interfaces/started
|
|
|
|
stop on network-interfaces/stop
|
2007-07-09 11:21:04 +00:00
|
|
|
|
|
|
|
respawn ${gw6cService}/bin/control start
|
|
|
|
";
|
|
|
|
}
|