genconfig: Turn off exit on error at end
* Need to check return status of diff, but don't want a false return code to exit the script. * Fixes #35
This commit is contained in:
parent
8d8f19d951
commit
88c76c787e
@ -193,12 +193,14 @@ for i in "${OVPN_PUSH[@]}"; do
|
|||||||
echo push \"$i\" >> "$conf"
|
echo push \"$i\" >> "$conf"
|
||||||
done
|
done
|
||||||
|
|
||||||
|
set +e
|
||||||
|
|
||||||
# Clean-up duplicate configs
|
# Clean-up duplicate configs
|
||||||
if diff -q "$bak_env" "$OVPN_ENV"; then
|
if diff -q "$bak_env" "$OVPN_ENV" 2>/dev/null; then
|
||||||
echo "Removing duplicate back-up: $bak_env"
|
echo "Removing duplicate back-up: $bak_env"
|
||||||
rm -fv "$bak_env"
|
rm -fv "$bak_env"
|
||||||
fi
|
fi
|
||||||
if diff -q "$bak" "$conf"; then
|
if diff -q "$bak" "$conf" 2>/dev/null; then
|
||||||
echo "Removing duplicate back-up: $bak"
|
echo "Removing duplicate back-up: $bak"
|
||||||
rm -fv "$bak"
|
rm -fv "$bak"
|
||||||
fi
|
fi
|
||||||
|
Loading…
Reference in New Issue
Block a user