Not starting if PIA credentials is not set

This commit is contained in:
Kristian Haugene 2015-05-10 18:30:28 +02:00
parent 0e53814b19
commit faa3972ab4
2 changed files with 5 additions and 7 deletions

View File

@ -28,9 +28,7 @@ ADD transmission/runUpdates.sh /etc/transmission-daemon/startPortUpdates.sh
ADD transmission/down.sh /etc/transmission-daemon/stop.sh
ADD runOpenVpn.sh /etc/openvpn/start.sh
ENV PIA_USERNAME=**None** \
PIA_PASSWORD=**None** \
"TRANSMISSION_ALT_SPEED_DOWN=50" \
ENV "TRANSMISSION_ALT_SPEED_DOWN=50" \
"TRANSMISSION_ALT_SPEED_ENABLED=false" \
"TRANSMISSION_ALT_SPEED_TIME_BEGIN=540" \
"TRANSMISSION_ALT_SPEED_TIME_DAY=127" \

View File

@ -24,14 +24,14 @@ then
fi
# add PIA user/pass
if [ "$PIA_USERNAME" != "**None**" ];
then
if [ -z "$PIA_USERNAME" ] || [ -z "$PIA_PASSWORD" ] ; then
echo "PIA credentials not set. Exiting."
exit 1
else
echo "Setting PIA credentials..."
mkdir -p /config
echo $PIA_USERNAME > /config/pia-credentials.txt
echo $PIA_PASSWORD >> /config/pia-credentials.txt
else
echo "Not setting PIA credentials."
fi
dockerize \