X-Git-Url: https://plomlompom.com/repos/foo.html?a=blobdiff_plain;ds=inline;f=buster%2Fsetup_scripts%2Fsetup_website.sh;h=84896bf4208709f0f71c9c6b8341f4cfa8ff2b13;hb=eeb6a9bb67e46e72b02c4cddb342178719c91322;hp=08739032c91debb9f010ccd5c83325d4e985c556;hpb=4c8947efd6d756dbbd42ebe5610ae6ea8875aeb9;p=config
diff --git a/buster/setup_scripts/setup_website.sh b/buster/setup_scripts/setup_website.sh
index 0873903..84896bf 100755
--- a/buster/setup_scripts/setup_website.sh
+++ b/buster/setup_scripts/setup_website.sh
@@ -37,7 +37,7 @@ rm /home/plom/prepare_to_meet_server.sh
# To use this dir, "git clone --mirror" repo source paths into it as user plom.
# As user plom, touch git-daemon-export-ok files into it to make the repo
# publically available.
-if [ "$init_state" = "new" ]; then
+if [ "${init_state}" = "new" ]; then
mkdir /var/repos
chown plom:plom /var/repos
else
@@ -57,7 +57,7 @@ ln -s /etc/nginx/sites-available/website.nginx /etc/nginx/sites-enabled/website.
rm -rf /var/www
mkdir /var/www
chown plom:plom /var/www
-if [ "$init_state" = "new" ]; then
+if [ "${init_state}" = "new" ]; then
su -lc "cd /var/repos && git clone --mirror ${old_server}:repos/website" plom
cp "${config_tree_prefix}/other_files/website_hook_post-receive" /var/repos/website.git/hooks/post-receive
fi
@@ -89,16 +89,15 @@ mkdir -p "${irclogs_dir}"
chown -R plom:plom "${irclogs_dir}"
mkdir -p "${irclogs_pw_dir}"
chown -R plom:plom "${irclogs_pw_dir}"
-if [ "$init_state" = "new" ]; then
+if [ "${init_state}" = "new" ]; then
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
fi
-
su -lc "git clone /var/repos/plomlombot-irc.git" plom
cp "${config_tree_prefix}/other_files/plomlombot_daemon.sh" /home/plom/
chown plom:plom /home/plom/plomlombot_daemon.sh
-if [ "$init_state" = "new" ]; then
+if [ "${init_state}" = "new" ]; then
echo 'bot: plomlombog plomlombog #plomlomtest irc.freenode.net foo bar' >> /home/plom/.plomlombot
chown plom:plom /home/plom/.plomlombot
else
@@ -106,7 +105,7 @@ else
su -lc "./mirror_dir.sh ${old_server} /home/plom/plomlombot_db" plom
rm /home/plom/mirror_dir.sh
su -lc "scp plom@${old_server}:.plomlombot ~" plom
- ssh plom@"${old_server}" "su -lc 'service plomlombot stop'"
+ su -lc "ssh plom@${old_server} \"su -lc 'service plomlombot stop'\"" plom
fi
systemctl enable plomlombot.service