2007-07-09 13:21:04 +02: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 22:42:25 +02:00
|
|
|
procps upstart iputils gnused
|
|
|
|
gnugrep;
|
2007-07-09 13:21:04 +02:00
|
|
|
username = getCfg "username";
|
|
|
|
password = getCfg "password";
|
|
|
|
server = getCfg "server";
|
2007-08-08 22:42:25 +02:00
|
|
|
keepAlive = getCfg "keepAlive";
|
2007-07-09 13:21:04 +02:00
|
|
|
};
|
|
|
|
in
|
|
|
|
{
|
|
|
|
name = "gw6c";
|
|
|
|
users = [];
|
|
|
|
groups = [];
|
|
|
|
job = "
|
|
|
|
description \"Gateway6 client\"
|
|
|
|
|
2007-08-02 23:26:38 +02:00
|
|
|
start on network-interfaces/started
|
|
|
|
stop on network-interfaces/stop
|
2007-07-09 13:21:04 +02:00
|
|
|
|
|
|
|
respawn ${gw6cService}/bin/control start
|
|
|
|
";
|
|
|
|
}
|