BitlBee: Run as bitlbee' instead of root'.

svn path=/nixos/trunk/; revision=11292
This commit is contained in:
Ludovic Courtès 2008-03-26 16:42:57 +00:00
parent f9cbd6e640
commit 3957962cf9
3 changed files with 18 additions and 7 deletions

View File

@ -24,6 +24,7 @@
haldaemon = 5;
vsftpd = 7;
ftp = 8;
bitlbee = 9;
avahi = 10;
portmap = 11;
audio = 17;

View File

@ -1042,7 +1042,7 @@
};
portNumber = mkOption {
default = "6667";
default = 6667;
description = ''
Number of the port BitlBee will be listening to.
'';

View File

@ -1,17 +1,27 @@
args: with args;
let
bitlbeeUid = (import ../system/ids.nix).uids.bitlbee;
in
{
name = "bitlbee";
users = [
{ name = "bitlbee";
uid = (import ../system/ids.nix).uids.bitlbee;
uid = bitlbeeUid;
description = "BitlBee user";
home = "/var/empty";
}
];
job = "
description \"BitlBee IRC to other chat networks gateway\"
groups = [
{ name = "bitlbee";
gid = (import ../system/ids.nix).gids.bitlbee;
}
];
job = ''
description "BitlBee IRC to other chat networks gateway"
start on network-interfaces/started
stop on network-interfaces/stop
@ -23,8 +33,8 @@ start script
fi
end script
# FIXME: Eventually we want to use inetd instead of using `-F'.
respawn ${bitlbee}/sbin/bitlbee -F -p ${portNumber} -i ${interface}
";
respawn ${bitlbee}/sbin/bitlbee -F -p ${toString portNumber} \
-i ${interface} -u bitlbee
'';
}