Skip to content

Commit f10c756

Browse files
Changing startup.sh to write .htaccess files only if they don't exists
1 parent 42cac03 commit f10c756

File tree

1 file changed

+2
-12
lines changed

1 file changed

+2
-12
lines changed

startup.sh

Lines changed: 2 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -100,24 +100,14 @@ Deny from all"
100100

101101
# Checking files/.htaccess
102102
if [[ -e /var/www/sites/default/files/.htaccess ]]; then
103-
if [[ "$FILES_HTACCESS" = $(cat htaccessfiles.txt) ]]; then
104-
echo "File already exists"
105-
else
106-
echo "Files different"
107-
echo "$FILES_HTACCESS" > /var/www/sites/default/files/.htaccess
108-
fi
103+
echo "File already exists"
109104
else
110105
echo "$FILES_HTACCESS" > /var/www/sites/default/files/.htaccess
111106
fi
112107

113108
# Checking /tmp/.htaccess
114109
if [[ -e /tmp/.htaccess ]]; then
115-
if [[ "$TMP_HTACCESS" = $(cat htaccessfiles.txt) ]]; then
116-
echo "File already exists"
117-
else
118-
echo "Files different"
119-
echo "$TMP_HTACCESS" > /tmp/.htaccess
120-
fi
110+
echo "File already exists"
121111
else
122112
echo "$TMP_HTACCESS" > /tmp/.htaccess
123113
fi

0 commit comments

Comments
 (0)