The Apache Solution Shell Scripts
aclean.sh
rm /usr/lib/cgi-bin/xholidays
rm xholidays
rm /tmp/holidaysIX /tmp/holidaysIX.idx
rm /tmp/acoberrplus
/usr/bin/pkill -f firefox
abuild.sh
#/bin/bash
echo 'starting shellscript'
echo 'set -e'
set -e
echo 'run cit setup script'
export DEFAULT_CITDIR=/opt/cobol-it4-64
export COBOLITDIR=$DEFAULT_CITDIR
export PATH=$COBOLITDIR/bin:${PATH}
export LD_LIBRARY_PATH="$COBOLITDIR/lib:${LD_LIBRARY_PATH:=}"
export DYLD_LIBRARY_PATH="$COBOLITDIR/lib:${DYLD_LIBRARY_PATH:=}"
export SHLIB_PATH="$COBOLITDIR/lib:${SHLIB_PATH:=}"
export LIBPATH="$COBOLITDIR/lib:${LIBPATH:=}"
export COB="COBOL-IT"
echo COBOL-IT Environement set to $COBOLITDIR
echo 'building service ...'
cobc -g -ftraceall -x xholidays.cbl holidays.cbl
cp xholidays /usr/lib/cgi-bin/
echo 'all done'
xplus40.sh
#!/bin/bash
export COBOLIT_LICENSE=/opt/cobol-it4-64/citlicense-all.xml
COBOLITDIR=/opt/cobol-it4-64
PATH=$COBOLITDIR/bin:${PATH}
LD_LIBRARY_PATH="$COBOLITDIR/lib:${LD_LIBRARY_PATH:=}"
DYLD_LIBRARY_PATH="$COBOLITDIR/lib:${DYLD_LIBRARY_PATH:=}"
SHLIB_PATH="$COBOLITDIR/lib:${SHLIB_PATH:=}"
LIBPATH="$COBOLITDIR/lib:${LIBPATH:=}"
COB="COBOL-IT"
COB_ERROR_FILE=/tmp/acoberrplus
export COB_FILE_PATH=/tmp/
export COB COBOLITDIR LD_LIBRARY_PATH PATH DYLD_LIBRARY_PATH SHLIB_PATH LIBPATH COB_ERROR_FILE
./xholidays
aallwithcurl.sh
#/bin/bash
curl --ipv4 --no-buffer -o /tmp/acurlpost --data-urlencode @/tmp/poststring http://localhost/cgi-bin/xplus40.sh
curl --ipv4 --no-buffer -o /tmp/acurlget --data-urlencode @/tmp/getstring http://localhost/cgi-bin/xplus40.sh
curl --ipv4 --no-buffer -o /tmp/acurlput --data-urlencode @/tmp/putstring http://localhost/cgi-bin/xplus40.sh
curl --ipv4 --no-buffer -o /tmp/acurldelete --data-urlencode @/tmp/deletestring http://localhost/cgi-bin/xplus40.sh
curl --ipv4 --no-buffer -o /tmp/acurlget2 --data-urlencode @/tmp/getstring http://localhost/cgi-bin/xplus40.sh
apost.sh
#!/bin/bash
echo 'starting firefox...'
firefox ./ahtml/appost.html
appost.html
Message:<br>
<textarea rows="20" cols="90" maxlength="1000" name="msg" form="myForm">
</textarea>
<br>
<form action="http://localhost/cgi-bin/xplus40.sh" target="result2" method="post" id="myForm" accept-charset="ISO-8859-1">
<input type="submit" value="POST">
</form>
<p>Result:</p>
<iframe name="result2" style="height:450px;width:643px;"></iframe>
aget.sh
#!/bin/bash
echo 'starting firefox...'
firefox ./ahtml/apget.html
apget.html
Message:<br>
<textarea rows="20" cols="90" maxlength="1000" name="msg" form="myForm">
</textarea>
<br>
<form action="http://localhost/cgi-bin/xplus40.sh" target="result2" method="post" id="myForm" accept-charset="ISO-8859-1">
<input type="submit" value="GET">
</form>
<p>Result:</p>
<iframe name="result2" style="height:450px;width:643px;"></iframe>
aput.sh
#!/bin/bash
echo 'starting firefox...'
firefox ./ahtml/apput.html
apput.html
Message:<br>
<textarea rows="20" cols="90" maxlength="1000" name="msg" form="myForm">
</textarea>
<br>
<form action="http://localhost/cgi-bin/xplus40.sh" target="result2" method="post" id="myForm" accept-charset="ISO-8859-1">
<input type="submit" value="PUT">
</form>
<p>Result:</p>
<iframe name="result2" style="height:450px;width:643px;"></iframe>
adelete.sh
#!/bin/bash
echo 'starting firefox...'
firefox ./ahtml/apdelete.html
apdelete.html
Message:<br>
<textarea rows="20" cols="90" maxlength="1000" name="msg" form="myForm">
</textarea>
<br>
<form action="http://localhost/cgi-bin/xplus40.sh" target="result2" method="post" id="myForm" accept-charset="ISO-8859-1">
<input type="submit" value="DELETE">
</form>
<p>Result:</p>
<iframe name="result2" style="height:450px;width:643px;"></iframe>