aboutsummaryrefslogtreecommitdiffstats
path: root/modules/ii/templates
diff options
context:
space:
mode:
authorMichael Scherer <misc@mageia.org>2012-01-15 13:41:11 +0000
committerMichael Scherer <misc@mageia.org>2012-01-15 13:41:11 +0000
commit592706382d6e717e991cacb8041da179eafa5e95 (patch)
tree04a2663f6867c572341d665af900224c2c73cc5c /modules/ii/templates
parente12a6116d2bad80c9276c87f6d5199f660cdb2ed (diff)
downloadpuppet-592706382d6e717e991cacb8041da179eafa5e95.tar
puppet-592706382d6e717e991cacb8041da179eafa5e95.tar.gz
puppet-592706382d6e717e991cacb8041da179eafa5e95.tar.bz2
puppet-592706382d6e717e991cacb8041da179eafa5e95.tar.xz
puppet-592706382d6e717e991cacb8041da179eafa5e95.zip
add a custom wrapper for running ii, since it doesn't react like
a regular daemon, and doing this with simple shell command is too tedious.
Diffstat (limited to 'modules/ii/templates')
-rw-r--r--modules/ii/templates/ii_wrapper.pl10
1 files changed, 10 insertions, 0 deletions
diff --git a/modules/ii/templates/ii_wrapper.pl b/modules/ii/templates/ii_wrapper.pl
new file mode 100644
index 00000000..da3a380f
--- /dev/null
+++ b/modules/ii/templates/ii_wrapper.pl
@@ -0,0 +1,10 @@
+#!/usr/bin/perl
+use warnings;
+use strict;
+use Proc::Daemon;
+my $nick = "<%= nick %>";
+my $server = "<%= server %>";
+
+Proc::Daemon::Init();
+fork() || exec "ii -n $nick -i /var/lib/ii/$nick -s $server";
+wait();