Skip to content

Commit 0726de1

Browse files
committed
if git then remove existing content
1 parent a11e911 commit 0726de1

File tree

1 file changed

+2
-4
lines changed

1 file changed

+2
-4
lines changed

setup.sh

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -148,14 +148,12 @@ case $git in [yY]* )
148148
chgrp $owner /var/www/$folder
149149
;;
150150
esac
151-
;;
152151
touch /var/www/$folder/$folder.git/hooks/post-receive
153152
echo "git --work-tree=/var/www/$name/content --git-dir=/var/www/$name/$name.git checkout -f master" > /var/www/$folder/$folder.git/hooks/post-receive
154153
chmod +x /var/www/$folder/$folder.git/hooks/post-receive
155-
156-
154+
rm $content_location/index.html
155+
;;
157156
esac
158157

159-
160158
systemctl restart nginx
161159
echo 'All done!'

0 commit comments

Comments
 (0)