Use bash for Debian compat
This commit is contained in:
parent
89c2c4a2dc
commit
5e89d9d31e
7 changed files with 50 additions and 6 deletions
|
|
@ -84,7 +84,7 @@ CONNTRACK states.
|
||||||
* `mcrypt`;
|
* `mcrypt`;
|
||||||
* `HTTP::Request::Common` perl module (provided by `libwww-perl`);
|
* `HTTP::Request::Common` perl module (provided by `libwww-perl`);
|
||||||
* `Digest::Whirlpool` perl module (provided by `lib-digest-whirlpool-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
|
`build-essential`) to decrypt submissions (see
|
||||||
https://metacpan.org/pod/Mcrypt);
|
https://metacpan.org/pod/Mcrypt);
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,4 @@
|
||||||
#!/bin/sh
|
#!/bin/bash
|
||||||
|
|
||||||
# This script mades backup of important things
|
# This script mades backup of important things
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,4 @@
|
||||||
#!/bin/sh
|
#!/bin/bash
|
||||||
|
|
||||||
# This script deletes Onyx framework cache
|
# This script deletes Onyx framework cache
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,4 @@
|
||||||
#!/bin/sh
|
#!/bin/bash
|
||||||
|
|
||||||
BASEURL="localhost"
|
BASEURL="localhost"
|
||||||
SALT_TEAM="connected"
|
SALT_TEAM="connected"
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,4 @@
|
||||||
#!/bin/sh
|
#!/bin/bash
|
||||||
|
|
||||||
# This script does all actions in backend production environment
|
# This script does all actions in backend production environment
|
||||||
|
|
||||||
|
|
@ -14,6 +14,8 @@ then
|
||||||
exit $?
|
exit $?
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
mkdir -p ./logs
|
||||||
|
|
||||||
touch ./logs/checks.log
|
touch ./logs/checks.log
|
||||||
tail -f ./logs/checks.log &
|
tail -f ./logs/checks.log &
|
||||||
KP1=$!
|
KP1=$!
|
||||||
|
|
|
||||||
42
launch_local.sh
Executable file
42
launch_local.sh
Executable 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"
|
||||||
|
|
@ -1,4 +1,4 @@
|
||||||
#!/bin/sh
|
#!/bin/bash
|
||||||
|
|
||||||
# This script synchronizes first, the generated frontend and then
|
# This script synchronizes first, the generated frontend and then
|
||||||
# retrieves submissions
|
# retrieves submissions
|
||||||
|
|
|
||||||
Reference in a new issue