diff --git a/docker-entrypoint.sh b/docker-entrypoint.sh index c90e507..1594708 100755 --- a/docker-entrypoint.sh +++ b/docker-entrypoint.sh @@ -26,6 +26,6 @@ find /tmp ! -user daemon -exec chown daemon:daemon {} \; & # lancement des daemons -/app/public/irc3_wrapper.sh ws +su-exec daemon:daemon /app/public/irc3_wrapper.sh ws npm run watcher & exec su-exec daemon:daemon npm start diff --git a/public/irc3_wrapper.sh b/public/irc3_wrapper.sh index 53e03ab..3aaa2cf 100755 --- a/public/irc3_wrapper.sh +++ b/public/irc3_wrapper.sh @@ -18,15 +18,15 @@ Usage ===== - $programme (start|ws|job|stop) + $programme (start|ws|job|stop) $programme help Options ======= help affiche cette aide - job envoie les données au programme “IRC3sp.pl” + job envoie les données au programme “IRC3sp.pl” start lance le programme “IRC3sp.pl” en mode “nohup” - stop arrête le programme “IRC3sp.pl” + stop arrête le programme “IRC3sp.pl” ws lance le programme “IRC3sp.pl” en mode “nohup” et “webservice” EOT @@ -36,12 +36,12 @@ function lance_irc3 { -nohup IRC3sp.pl -t CoL.txt -p /tmp/fifo_irc3 -c & +nohup IRC3sp.pl -t CoL.txt -p /tmp/fifo_irc3 -c & } function lance_irc3_ws { -nohup /app/public/IRC3sp.pl -t CoL.txt -p /tmp/fifo_irc3 -c -w > /tmp/logIrc3.txt 2>&1 & +nohup /app/public/IRC3sp.pl -t /app/public/CoL.txt -p /tmp/fifo_irc3 -c -w > /tmp/logIrc3.txt 2>&1 & } function arrete_irc3 @@ -61,7 +61,7 @@ data=$(cat /dev/stdin) (echo "%% JOB POUR FIFO /tmp/fifo_job_$$"; - cat "$data"; + echo "$data"; echo "%% FIN JOB") > /tmp/fifo_irc3 cat /tmp/fifo_job_$$