home · contact · privacy
Fix.
[config] / buster / setup_scripts / setup_dumpsite.sh
index f1690ac6576c28436847e04812d87db5b84c680a..000045b6b73afb3c486c110ad85db2142eb0b104 100755 (executable)
@@ -1,9 +1,8 @@
 #!/bin/sh
 set -e
-set -x
 
 if [ "$#" -ne 3 ]; then
-    echo 'Need domain name and mail and old server.'
+    echo 'Need domain name (choose wisely!) and mail and old server.'
     false
 fi
 domain="$1"
@@ -12,6 +11,7 @@ old_server="$3"
 
 # Install configs, set up firewall.
 echo "postfix postfix/main_mailer_type string 'Internet Site'" | debconf-set-selections
+# TODO: do we really want hostname as mailname?
 echo "postfix postfix/mailname string $(hostname -f)" | debconf-set-selections
 config_tree_prefix="${HOME}/config/buster"
 ./install_for_target.sh web dumpsite
@@ -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
@@ -81,7 +76,7 @@ service url_catcher start
 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
-rm /home/plom/,mirror_dir.sh
+rm /home/plom/mirror_dir.sh
 
 # Set up index.html
 cp "${config_tree_prefix}/other_files/dumpsite_index.html" /var/www-dump/index.html