aboutsummaryrefslogtreecommitdiffstats
path: root/modules/ii/templates/ii_wrapper.pl
blob: 68128314d8a377e59a341256f2e2b763aa5bda0f (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();