Use bash for Debian compat

This commit is contained in:
nemunaire 2014-11-20 21:03:35 +01:00
parent 89c2c4a2dc
commit 5e89d9d31e
7 changed files with 50 additions and 6 deletions

View File

@ -84,7 +84,7 @@ CONNTRACK states.
* `mcrypt`;
* `HTTP::Request::Common` perl module (provided by `libwww-perl`);
* `Digest::Whirlpool` perl module (provided by `lib-digest-whirlpool-perl`);
* `Mcrypt` from CPAN (`cpan -i Mcrypt`, on Debian, it requires `libtool` and
* `Mcrypt` from CPAN (`cpan -i Mcrypt`, on Debian, it requires `libltdl-dev` and
`build-essential`) to decrypt submissions (see
https://metacpan.org/pod/Mcrypt);

View File

@ -1,4 +1,4 @@
#!/bin/sh
#!/bin/bash
# This script mades backup of important things

View File

@ -1,4 +1,4 @@
#!/bin/sh
#!/bin/bash
# This script deletes Onyx framework cache

View File

@ -1,4 +1,4 @@
#!/bin/sh
#!/bin/bash
BASEURL="localhost"
SALT_TEAM="connected"

View File

@ -1,4 +1,4 @@
#!/bin/sh
#!/bin/bash
# This script does all actions in backend production environment
@ -14,6 +14,8 @@ then
exit $?
fi
mkdir -p ./logs
touch ./logs/checks.log
tail -f ./logs/checks.log &
KP1=$!

42
launch_local.sh Executable file
View File

@ -0,0 +1,42 @@
#!/bin/bash
# This script does all actions in backend local environment
rm -f /tmp/stop
cd `dirname "$0"`
source config.sh
#if [ "$UID" = "0" ]
#then
# SCRIPT=`pwd`/`basename "$0"`
# su -c "sh $SCRIPT" "$SYNCHRO_USER"
# exit $?
#fi
mkdir -p ./logs
touch ./logs/checks.log
tail -f ./logs/checks.log &
KP1=$!
TMPF=`mktemp`
tail -f "$TMPF" | ./gen_site.pl -d -s /tmp/test.sock -bt /challenge/ -ba /challenge-admin/ -o ./out &
KP2=$!
while ! [ -f /tmp/stop ];
do
if [ `ls submission | wc -l` -gt 1 ]
then
./clear_cache.sh top
./check.pl 2>> ./logs/checks.log >> "$TMPF"
else
sleep 1
fi
done
kill -9 $KP1 $KP2
rm -rf "$TMPF"

View File

@ -1,4 +1,4 @@
#!/bin/sh
#!/bin/bash
# This script synchronizes first, the generated frontend and then
# retrieves submissions