aboutsummaryrefslogtreecommitdiffstats
path: root/modules/ii/templates/ii_wrapper.pl
blob: 5e5cc65e9bbb1a5f0a055a300593dc70a0a6fbf6 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
#!/usr/bin/perl
use warnings;
use strict;
use POSIX;
use Proc::Daemon;
my $nick = "<%= nick %>";
my $server = "<%= server %>";


Proc::Daemon::Init();
my (undef, undef, $uid) = getpwnam("nobody");
POSIX::setuid($uid);

fork() || exec "ii -n $nick -i /var/lib/ii/$nick -s $server";
wait();