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; haldaemon = 5;
vsftpd = 7; vsftpd = 7;
ftp = 8; ftp = 8;
bitlbee = 9;
avahi = 10; avahi = 10;
portmap = 11; portmap = 11;
audio = 17; audio = 17;

View File

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

View File

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