X-Git-Url: https://plomlompom.com/repos/%7B%7B%20web_path%20%7D%7D/decks/%7B%7Bdeck_id%7D%7D/cards/%7B%7Bcard_id%7D%7D/static/git-logo.png?a=blobdiff_plain;f=buster%2Fsetup_scripts%2Fsetup_website.sh;h=a29bd4ab63bdb8e11660cd9615d4ea074742ad4d;hb=19498cf7b573778209ed1428b17b8e626e8cbc71;hp=9394a94820b1c77342d3e1b7da9ebd8ba6c87b4f;hpb=1d6d8c874e12c47572c25424aaef64e3ec14197a;p=config diff --git a/buster/setup_scripts/setup_website.sh b/buster/setup_scripts/setup_website.sh index 9394a94..a29bd4a 100755 --- a/buster/setup_scripts/setup_website.sh +++ b/buster/setup_scripts/setup_website.sh @@ -49,7 +49,7 @@ if [ "${init_state}" = "new" ]; then else cp "${config_tree_prefix}/setup_scripts/mirror_dir.sh" /home/plom/ chmod a+w /var - if ["${init_state}" = "copy" ]; then + if [ "${init_state}" = "copy" ]; then su -lc "./mirror_dir.sh ${old_server} /var/repos" plom else su -lc "./mirror_dir.sh ${old_server} /var/public_repos" plom @@ -73,7 +73,6 @@ if [ "${init_state}" = "upgrade" ]; then elif [ "${init_state}" = "new" ]; then su -lc "cd /var/repos && git init --bare website.git" plom fi -# TODO: find out whether this can be part of cloned repo …? cp "${config_tree_prefix}/other_files/website_hook_post-receive" /var/repos/website.git/hooks/post-receive su -lc 'cd /var/www && git clone /var/repos/website.git .' plom @@ -123,12 +122,14 @@ else su -lc "scp plom@${old_server}:.plomlombot ~" plom su -lc "ssh plom@${old_server} \"su -lc 'service plomlombot stop'\"" plom fi - systemctl enable plomlombot.service service plomlombot start +# In the above step, we might have created a root-owned /var/www/html – +# fix this here. +chown -R plom:plom /var/www/html + # TODO: -# - commit git-daemon-export-ok directly into the public repos; rename -# /home/plom/public_repos to /home/plom/repos +# - rename /home/plom/public_repos to /home/plom/repos service nginx restart