Skip to content

Commit

Permalink
Code: clean up
Browse files Browse the repository at this point in the history
  • Loading branch information
plitc committed Oct 12, 2015
1 parent f643467 commit 123a4f2
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions easy_ipsec.sh
Original file line number Diff line number Diff line change
Expand Up @@ -251,6 +251,7 @@ dialog --inputbox "Enter your VPN IPsec Server Pre-shared key: (without spaces a

EASYIPSECSERVERPSKVALUE=$(sed 's/#//g' $EASYIPSECSERVERPSK | sed 's/%//g')

echo "" # dummy
/bin/cat <<PSK > /etc/racoon/psk.txt
### ### ### PLITC ### ### ###
# IPv4/v6 addresses
Expand All @@ -269,6 +270,14 @@ $EASYIPSECSERVERIPVALUE $EASYIPSECSERVERPSKVALUE
### ### ### PLITC ### ### ###
# EOF
PSK
if [ $? -eq 0 ]
then
: # dummy
else
KILLSAY > /dev/null 2>&1
say "Warning, the racoon/psk.txt file probably has a write-protection or immutable flag!" > /dev/null 2>&1 &
sleep 2
fi

/bin/chmod 0600 /etc/racoon/psk.txt
/bin/rm $EASYIPSECSERVERPSK
Expand Down

0 comments on commit 123a4f2

Please sign in to comment.