walcze z tematem od 2tygodni, tez musialem zrobic powiadomienia bez proxy to moj przyklad zrobiony na szybko, licze na wytkniecie bledow, podanie pomyslow jak to usprawnic lub przebudowac
--------------------------- instancja daemona:
nazwa: messages modul: ........./parser crontab: */1 * * * * priorytet: 5 --------------------------- edycja opcji:
command: chmod 700 /etc/init.d/LMS.messages; /etc/init.d/LMS.messages
file: /etc/init.d/LMS.messages
script: {if (fileexists("/etc/init.d/LMS.messages")) deletefile("/etc/init.d/LMS.messages"); /if;} iptables -t nat -D PREROUTING -p tcp -m multiport --dport 80,443,3128,8080 -j MESSAGES >/dev/null 2>&1 iptables -t nat -F MESSAGES >/dev/null 2>&1 iptables -t nat -X MESSAGES >/dev/null 2>&1 iptables -t nat -N MESSAGES
{if (number(NODES)) for (i=0; i<number(NODES); i++) if (number(NODES[i].warning)) }iptables -t nat -A MESSAGES -s {NODES[i].ip} -p tcp -m multiport --dport 80,443,3128,8080 -j REDIRECT --to-port 8002\n{ /if; /for; /if}\n iptables -t nat -A MESSAGES -j RETURN iptables -t nat -I PREROUTING -p tcp -m multiport --dport 80,443,3128,8080 -j MESSAGES\n ----------------------
virtual host apache'a na porcie 8002
Listen 8002 NameVirtualHost *:8002 <VirtualHost *:8002> ServerAdmin webmaster@bleble.org DocumentRoot /var/www/boards/message ServerName info.bleble.org rewriteengine on rewritecond /var/www/boards/message%{REQUEST_FILENAME} !-d rewritecond /var/www/boards/message%{REQUEST_FILENAME} !-f rewritecond /var/www/boards/message%{REQUEST_FILENAME} !-l rewriterule ^(.+) /var/www/boards/message/index.php </VirtualHost>
-------------------------- mala zmiana index.php
--- index.php 2007-05-09 10:36:59.000000000 +0200 +++ index.php-new 2007-06-07 20:10:52.000000000 +0200 @@ -165,6 +165,7 @@ if (isset($_GET['readed'])) { $DB->Execute('UPDATE nodes SET warning = 0 WHERE id = ?', array($nodeid)); + shell_exec("sudo /var/lms/bin/lmsd -h localhost -d lms -u lms -p mojehaslo -H host -q -f -i messages"); header('Location: '.$_GET['oldurl']); } else
-------------------------- sudo dla apache'a apache ALL = NOPASSWD: /var/lms/bin/lmsd
_______________________________________________ lms mailing list lms@lists.lms.org.pl http://lists.lms.org.pl/mailman/listinfo/lms