X-Git-Url: https://plomlompom.com/repos/?a=blobdiff_plain;f=buster%2Fsetup_scripts%2Fsetup_dumpsite.sh;h=2b8c732cf1b0b0b296b726e82fb0444ade12168b;hb=6b847de2430565e7cd7b654b5cffb6aa1b64a44b;hp=71cc6f5bd7c32e2febccd3f6458036ed5a704da0;hpb=547a633963f60d7f2a7498c6e9ee0c22ecf502bb;p=config diff --git a/buster/setup_scripts/setup_dumpsite.sh b/buster/setup_scripts/setup_dumpsite.sh index 71cc6f5..2b8c732 100755 --- a/buster/setup_scripts/setup_dumpsite.sh +++ b/buster/setup_scripts/setup_dumpsite.sh @@ -2,7 +2,7 @@ set -e set -x -if [ "$#" -ne 3 ]; then +if [ "$#" -ne 4 ]; then echo 'Need domain name and mail and old server.' false fi @@ -37,11 +37,6 @@ dump_dir=dump geheim_dir=geheim su -lc "ln -s /home/plom/${dump_dir} /var/www-dump/${dump_dir}" plom su -lc "ln -s /home/plom/${geheim_dir} /var/www-dump/${geheim_dir}" plom -# Use upper outcommented instead of lower code if setting up new empty server. -#su -lc "mkdir ${dump_dir} ${geheim_dir}" plom -#password_geheim=$(pwgen -1) -#echo "foo:{PLAIN}${password_geheim}" > /var/www-dump/password_geheim -#echo "geheim password is: ${password_geheim}" cp "${config_tree_prefix}/setup_scripts/mirror_dir.sh" /home/plom/ su -lc "./mirror_dir.sh ${old_server} /home/plom/${dump_dir}" plom su -lc "./mirror_dir.sh ${old_server} /home/plom/${geheim_dir}" plom @@ -78,7 +73,6 @@ su -lc "cd url-catcher && ln -s ../blog/captchas/linkable/ captchas" plom cp "${config_tree_prefix}/other_files/url-catcher_customizations.json" /home/plom/url-catcher/customizations.json systemctl enable url_catcher.service service url_catcher start -# Outcomment if setting up new / not migrating. cp "${config_tree_prefix}/setup_scripts/mirror_dir.sh" /home/plom/ su -lc "./mirror_dir.sh ${old_server} /home/plom/url-catcher/ips" plom su -lc "./mirror_dir.sh ${old_server} /home/plom/url-catcher/lists" plom