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. ...@@ -19,7 +19,7 @@ There is a script that provision 2 VMs on Vutlr for tests purpose.
``` ```
export VULTR_API_KEY= export VULTR_API_KEY=
./scripts/start.sh #need root access to modify your /etc/hosts ./scripts/start.sh
ssh root@server.test ssh root@server.test
cd /data/indiehosters cd /data/indiehosters
./tests/start.sh ./tests/start.sh
...@@ -28,7 +28,7 @@ reboot ...@@ -28,7 +28,7 @@ reboot
ssh root@server.test ssh root@server.test
./tests/stop.sh ./tests/stop.sh
exit 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. 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 ...@@ -37,6 +37,7 @@ do
fi fi
done done
echo Writing $LABEL to /etc/hosts file, needs your root password:
sudo -- sh -c "echo $IP $LABEL \#$SUBID >> /etc/hosts" sudo -- sh -c "echo $IP $LABEL \#$SUBID >> /etc/hosts"
while : while :
......
...@@ -2,6 +2,9 @@ ...@@ -2,6 +2,9 @@
LABEL=$1 LABEL=$1
SUBID=`cat /etc/hosts | grep $LABEL | cut -d# -f2` 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 sudo sed -i "/$LABEL/ d" /etc/hosts
curl -d SUBID=$SUBID https://api.vultr.com/v1/server/destroy\?api_key\=$VULTR_API_KEY 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" ...@@ -25,6 +25,7 @@ echo "We'll now modify your /etc/hosts to add the test application name"
applications=( `cat $ROOT_DIR/SUPPORTED_APPLICATIONS` ) applications=( `cat $ROOT_DIR/SUPPORTED_APPLICATIONS` )
for application in "${applications[@]}" for application in "${applications[@]}"
do do
echo Writing $LABEL to /etc/hosts file, needs your root password:
sudo -- sh -c "echo $IP $application.test >> /etc/hosts" sudo -- sh -c "echo $IP $application.test >> /etc/hosts"
done 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