Skip to content
Snippets Groups Projects
Commit a2ffe2d9 authored by Pierre Ozoux's avatar Pierre Ozoux
Browse files

Make clearer the need for root access.

parent 632afe7c
No related branches found
No related tags found
No related merge requests found
......@@ -19,7 +19,7 @@ There is a script that provision 2 VMs on Vutlr for tests purpose.
```
export VULTR_API_KEY=
./scripts/start.sh #need root access to modify your /etc/hosts
./scripts/start.sh
ssh root@server.test
cd /data/indiehosters
./tests/start.sh
......@@ -28,7 +28,7 @@ reboot
ssh root@server.test
./tests/stop.sh
exit
./scripts/stop.sh #need root access to modify your /etc/hosts
./scripts/stop.sh
```
Most of the tests are "visual", but by reading them, it gives you an idea on how to start and stop services.
......
......@@ -37,6 +37,7 @@ do
fi
done
echo Writing $LABEL to /etc/hosts file, needs your root password:
sudo -- sh -c "echo $IP $LABEL \#$SUBID >> /etc/hosts"
while :
......
......@@ -2,6 +2,9 @@
LABEL=$1
SUBID=`cat /etc/hosts | grep $LABEL | cut -d# -f2`
echo Writing $LABEL to /etc/hosts file, needs your root password:
sudo sed -i "/$LABEL/ d" /etc/hosts
curl -d SUBID=$SUBID https://api.vultr.com/v1/server/destroy\?api_key\=$VULTR_API_KEY
......@@ -25,6 +25,7 @@ echo "We'll now modify your /etc/hosts to add the test application name"
applications=( `cat $ROOT_DIR/SUPPORTED_APPLICATIONS` )
for application in "${applications[@]}"
do
echo Writing $LABEL to /etc/hosts file, needs your root password:
sudo -- sh -c "echo $IP $application.test >> /etc/hosts"
done
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment