diff --git a/.gitattributes b/.gitattributes index 7880b6a5..679127d7 100644 --- a/.gitattributes +++ b/.gitattributes @@ -494,6 +494,7 @@ etc/alternc/templates/postfix/sasl/smtpd.conf -text etc/alternc/templates/proftpd/modules.conf -text etc/alternc/templates/proftpd/proftpd.conf -text etc/alternc/templates/proftpd/welcome.msg -text +etc/xinetd.d/alternc_lxc -text install/alternc.install -text install/body_checks -text install/domaines.template -text @@ -582,6 +583,7 @@ src/alternc-check -text src/alternc-dboptimize -text src/alternc-passwd -text src/alternc_add_policy_dovecot -text +src/alternc_lxc_remote -text src/alternc_reload -text src/compress_logs.sh -text src/courier-dovecot-migrate.pl -text diff --git a/etc/xinetd.d/alternc_lxc b/etc/xinetd.d/alternc_lxc new file mode 100644 index 00000000..3b52493d --- /dev/null +++ b/etc/xinetd.d/alternc_lxc @@ -0,0 +1,16 @@ +service alternc_lxc +{ + type = UNLISTED + port = 6504 + socket_type = stream + protocol = tcp + wait = no + user = root + server = /var/lib/alternc-lxc/alternc_lxc_remote + + only_from = 127.0.0.1 + + disable = no +} + + diff --git a/src/alternc_lxc_remote b/src/alternc_lxc_remote new file mode 100755 index 00000000..9250ddbb --- /dev/null +++ b/src/alternc_lxc_remote @@ -0,0 +1,14 @@ +#!/usr/bin/env perl + +my $line = <>; + +my $nb = int(rand(42)); + +if ($nb % 2 == 0) { + print "Error message here::\n"; +} else { + print "Ok|127.0.0.1:4242|localhost:4242\n"; + my ($action,$login,$pass,$uid) = split /|/, $line; + printf("Hi %s (%d) do you want to %s? -> btw your pass is %s\n", $login, $uid, $action, $pass); +} +