From 3a1b676ffb70ef81240ee0dc5fb3dad22a0cdcef Mon Sep 17 00:00:00 2001 From: Akash Askoolum Date: Tue, 25 Jun 2019 23:35:22 +0100 Subject: [PATCH] Update link-config Create `servers` directory if necessary. --- script/link-config | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/script/link-config b/script/link-config index cd41628..610f336 100755 --- a/script/link-config +++ b/script/link-config @@ -22,7 +22,9 @@ if [[ ! -f ${FILE} ]]; then echo "File $FILE not found" exit 1 else - ln -fs ${FILE} ${NGINX_HOME}/servers/$(basename "$FILE") + DESTINATION_DIR=${NGINX_HOME}/servers + mkdir -p $DESTINATION_DIR + ln -fs ${FILE} $DESTINATION_DIR/$(basename "$FILE") fi # remove file (or symlink) from legacy `sites-enabled` directory if it exists