mirror of
https://github.com/BastilleBSD/templates.git
synced 2025-12-12 01:39:56 +01:00
added test.sh to grafana directory
This commit is contained in:
25
www/grafana/test.sh
Normal file
25
www/grafana/test.sh
Normal file
@@ -0,0 +1,25 @@
|
||||
echo "starting test script"
|
||||
cd ../../
|
||||
pwd
|
||||
bastille template testrun www/grafana
|
||||
echo "template applied"
|
||||
bastille cmd testrun service grafana 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="grafana"
|
||||
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
|
||||
Reference in New Issue
Block a user