Commit ff5a967b authored by 神楽坂玲奈's avatar 神楽坂玲奈

del fix

parent f8bbb6df
......@@ -18,11 +18,13 @@ if [ "$EXISTING" == "$CURRENT" ]; then
echo "Same"
else
echo "Diff"
DEL_CMD="ip route del $EXISTING_ROUTE"
if [ ! -n "$EXISTING_ROUTE" ]; then
DEL_CMD="ip route del $EXISTING_ROUTE"
echo $DEL_CMD
bash -c "$DEL_CMD"
fi
ADD_CMD="ip route add $CURRENT proto $PROTO $TAIL"
echo $DEL_CMD
echo $ADD_CMD
bash -c "$DEL_CMD"
bash -c "$ADD_CMD"
fi
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment