Skip to content

Commit

Permalink
Merge pull request #10 from guardian/aa-rm-sites-enabled
Browse files Browse the repository at this point in the history
remove file from sites-enabled if exists
  • Loading branch information
akash1810 authored Jun 20, 2019
2 parents a815915 + 0162001 commit 0ce52dd
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions script/link-config
Original file line number Diff line number Diff line change
Expand Up @@ -24,3 +24,10 @@ if [[ ! -f ${FILE} ]]; then
else
ln -fs ${FILE} ${NGINX_HOME}/servers/$(basename "$FILE")
fi

# remove file (or symlink) from legacy `sites-enabled` directory if it exists
MAYBE_OLD_FILE=${NGINX_HOME}/sites-enabled/$(basename "$FILE")

if [[ -f "$MAYBE_OLD_FILE" ]] || [[ -L "$MAYBE_OLD_FILE" ]]; then
rm ${MAYBE_OLD_FILE}
fi

0 comments on commit 0ce52dd

Please sign in to comment.