Skip to content

Commit

Permalink
fix
Browse files Browse the repository at this point in the history
  • Loading branch information
jimmyGALLAND committed Sep 21, 2024
1 parent fc1332a commit 79a2307
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions switchport/all/usr/sbin/switchport.sh
Original file line number Diff line number Diff line change
Expand Up @@ -64,13 +64,13 @@ outrange "${NEW_HTTP_PORT}"
outrange "${NEW_HTTPS_PORT}"

if [ "${CURRENT_HTTP_PORT}" != "${NEW_HTTP_PORT}" ]; then
#sed -i "s/^\([ \t]\+listen[ \t]\+[]:[]*\)${CURRENT_HTTP_PORT}\([^0-9]\)/\1${NEW_HTTP_PORT}\2/" "${TARGET_FILE}"
sed -i "s/^\([ \t]\+listen[ \t]\+[]:[]*\)${CURRENT_HTTP_PORT}\([^0-9]\)/\1${NEW_HTTP_PORT}\2/" ${TARGET_FILE}
echo ${NEW_HTTP_PORT} >"${CURRENT_HTTP_PORT_FILE}"
echo "Switch port http ${CURRENT_HTTP_PORT} to ${NEW_HTTP_PORT}"
fi

if [ "${CURRENT_HTTPS_PORT}" != "${NEW_HTTPS_PORT}" ]; then
sed -i "s/^\([ \t]\+listen[ \t]\+[]:[]*\)${CURRENT_HTTPS_PORT}\([^0-9]\)/\1${NEW_HTTPS_PORT}\2/" "${TARGET_FILE}"
sed -i "s/^\([ \t]\+listen[ \t]\+[]:[]*\)${CURRENT_HTTPS_PORT}\([^0-9]\)/\1${NEW_HTTPS_PORT}\2/" ${TARGET_FILE}
echo ${NEW_HTTPS_PORT} >"${CURRENT_HTTPS_PORT_FILE}"
echo "Switch port https ${CURRENT_HTTPS_PORT} to ${NEW_HTTPS_PORT}"
fi

0 comments on commit 79a2307

Please sign in to comment.