home · contact · privacy
Refactor.
authorChristian Heller <c.heller@plomlompom.de>
Wed, 25 Mar 2020 22:24:43 +0000 (23:24 +0100)
committerChristian Heller <c.heller@plomlompom.de>
Wed, 25 Mar 2020 22:24:43 +0000 (23:24 +0100)
buster/setup_scripts/setup_website.sh

index 035d852fc90fdbb41379825800212cc6a76b5a0e..6288a27427ac416f16f065f1b5e4e8447b77afbc 100755 (executable)
@@ -47,10 +47,12 @@ cp "${config_tree_prefix}/other_files/website_hook_post-receive" /var/repos/webs
 su -lc 'cd /var/www && git clone /var/repos/website.git .' plom
 
 # Set up plomlombot.
-mkdir /var/www/html/irclogs
-chown plom:plom /var/www/html/irclogs
-mkdir /var/www/irclogs_pw
-chown plom:plom /var/www/irclogs_pw
+irclogs_dir=/var/www/html/irclogs
+irclogs_pw_dir=/var/www/irclogs_pw
+mkdir -p "${irclogs_dir}"
+chown -R plom:plom "${irclogs_dir}"
+mkdir -p "${irclogs_pw_dir}"
+chown -R plom:plom "${irclogs_pw_dir}"
 su -lc "cd /var/repos && git clone --mirror https://plomlompom.com/repos/clone/plomlombot-irc" plom
 su -lc "touch /var/repos/plomlombot-irc.git/git-daemon-export-ok" plom
 cp "${config_tree_prefix}/other_files/plomlombot_hook_post-receive" /var/repos/plomlombot-irc.git/hooks/post-receive