5 if [ "$#" -lt 1 ]; then
6 echo "Need public key ID and optionally old server IP."
12 config_tree_prefix="${HOME}/config/buster"
13 ./install_for_target.sh play
14 ./copy_dirtree.sh "${config_tree_prefix}/etc_files" "" play
15 cp "${config_tree_prefix}/other_files/weechatrc" /home/plom/.weechatrc
16 cp "${config_tree_prefix}/other_files/weechat-wrapper.sh" /home/plom/
17 cp "${config_tree_prefix}/other_files/weechatlogs-encrypter.sh" /home/plom/
18 chown plom:plom /home/plom/*weechat*
19 echo "${gpg_key}" /home/plom/.encrypt_target
20 chown plom:plom /home/plom/.encrypt_target
22 # TODO refactor with setup_website.sh
24 keyservers='sks-keyservers.net/ keys.gnupg.net'
28 for keyserver in $(echo "${keyservers}"); do
29 su plom -c "gpg --no-tty --keyserver $keyserver --recv-key ${gpg_key}"
30 if [ $? -eq "0" ]; then
34 echo "Attempt with keyserver ${keyserver} unsuccessful, trying other."
36 if [ "${do_break}" -eq "1" ]; then
42 if [ "${old_server}" != "" ]; then
43 cp "${config_tree_prefix}/setup_scripts/prepare_to_meet_server.sh" /home/plom/
44 su -lc "./prepare_to_meet_server.sh ${old_server}" plom
45 read -p'Hit Enter when you are done.' ignore
46 rm /home/plom/prepare_to_meet_server.sh
47 su -lc "scp plom@${old_server}:.weechatrc ~" plom
48 cp "${config_tree_prefix}/setup_scripts/mirror_dir.sh" /home/plom/
49 su -lc "./mirror_dir.sh ${old_server} /home/plom/weechatlogs" plom
50 rm /home/plom/mirror_dir.sh
53 systemctl enable --now encrypt_chatlogs.timer