mirror of
https://github.com/BastilleBSD/templates.git
synced 2025-12-10 17:00:30 +01:00
* nginx test 1 * nginx test 2 * nginx test 3 * nginx test 4 * nginx test 5 * nginx test 6 * nginx test 7 * nginx test 8 * nginx test 9 * nginx test 10 * nginx test 11 * nginx test 12 * nginx test 13 * nginx test 14 * nginx test 15 * nginx test 16 * nginx test 17 * nginx test 18 * nginx test 19 * nginx test 20 * nginx test 21 * nginx test 22 * nginx test 23 * nginx test 24 * nginx test 25 * nginx test 26 * nginx test 27 * nginx test 28 * rdr fixes * start of haproxy test 1 * test 29 * test 30 * test 31 * nginx status * added service check * added service check 2 * added service check 3 * added service check 4 * added service check 5 * completed nginx check --------- Co-authored-by: Barry McCormick <bmccormick@debianbeast.maildragon.com>
29 lines
684 B
Bash
29 lines
684 B
Bash
echo "starting test script"
|
|
cd ../../
|
|
pwd
|
|
bastille template testrun www/nginx
|
|
echo "template applied"
|
|
bastille cmd testrun service nginx status
|
|
bastille rdr testrun tcp 80 80
|
|
bastille rdr testrun list
|
|
ifconfig
|
|
response=$(curl -s -o /dev/null -w "%{http_code}" http://localhost:80)
|
|
echo "tested response"
|
|
echo "response is:" $response
|
|
|
|
service_name="nginx"
|
|
jail_name="testrun"
|
|
|
|
service_status=$(jexec testrun service $service_name status)
|
|
|
|
# Check the service status and provide appropriate output
|
|
if echo "$service_status" | grep -q "is running"; then
|
|
echo "$service_name is running in jail $jail_name."
|
|
else
|
|
echo "$service_name is not running in jail $jail_name."
|
|
exit 1
|
|
fi
|
|
|
|
|
|
|