Create relative symlinks.

This commit is contained in:
Derek Smith 2023-04-06 11:13:51 -04:00
parent f05daa9bfb
commit dd33c34710
Signed by: farscapian
GPG Key ID: B443E530A14E1C90

View File

@ -178,8 +178,9 @@ function stub_site_definition {
mkdir -p "$SITE_PATH" "$PROJECT_PATH/sites" mkdir -p "$SITE_PATH" "$PROJECT_PATH/sites"
# create a symlink from the PROJECT_PATH/sites/DOMAIN_NAME to the ss-sites/domain name # create a symlink from the PROJECT_PATH/sites/DOMAIN_NAME to the ss-sites/domain name
if [ ! -d "$PROJECT_PATH/sites/$DOMAIN_NAME" ]; then DOMAIN_SYMLINK_PATH="$PROJECT_PATH/sites/$DOMAIN_NAME"
ln -s "$SITE_PATH" "$PROJECT_PATH/sites/$DOMAIN_NAME" if [ ! -L "$DOMAIN_SYMLINK_PATH" ]; then
ln -r -s "$SITE_PATH" "$DOMAIN_SYMLINK_PATH"
fi fi
if [ ! -f "$SITE_PATH/site.conf" ]; then if [ ! -f "$SITE_PATH/site.conf" ]; then
@ -226,8 +227,9 @@ export PROJECT_PATH="$PROJECTS_PATH/$PROJECT_NAME"
mkdir -p "$PROJECT_PATH" "$REMOTE_PATH/projects" mkdir -p "$PROJECT_PATH" "$REMOTE_PATH/projects"
# create a symlink from ./remotepath/projects/project # create a symlink from ./remotepath/projects/project
if [ ! -d "$REMOTE_PATH/projects/$PROJECT_NAME" ]; then PROJECT_SYMLINK="$REMOTE_PATH/projects/$PROJECT_NAME"
ln -s "$PROJECT_PATH" "$REMOTE_PATH/projects/$PROJECT_NAME" if [ ! -L "$PROJECT_SYMLINK" ]; then
ln -r -s "$PROJECT_PATH" "$PROJECT_SYMLINK"
fi fi
# check to see if the enf file exists. exist if not. # check to see if the enf file exists. exist if not.