From ac02dd68f29f0b22df51bc73ce4b1a47c2c1e1c6 Mon Sep 17 00:00:00 2001
From: Christian Heller <c.heller@plomlompom.de>
Date: Fri, 26 Jun 2020 23:17:18 +0200
Subject: [PATCH] Fix.

---
 buster/apt-mark/play                                          | 2 ++
 .../play/etc/systemd/system/encrypt_chatlogs.service          | 2 +-
 buster/setup_scripts/setup_play.sh                            | 4 ++--
 3 files changed, 5 insertions(+), 3 deletions(-)
 mode change 100644 => 100755 buster/setup_scripts/setup_play.sh

diff --git a/buster/apt-mark/play b/buster/apt-mark/play
index e9ad25a..154f7e7 100644
--- a/buster/apt-mark/play
+++ b/buster/apt-mark/play
@@ -1,2 +1,4 @@
 weechat
 screen
+gnupg
+dirmngr
diff --git a/buster/etc_files/play/etc/systemd/system/encrypt_chatlogs.service b/buster/etc_files/play/etc/systemd/system/encrypt_chatlogs.service
index d7b6e49..bc81613 100644
--- a/buster/etc_files/play/etc/systemd/system/encrypt_chatlogs.service
+++ b/buster/etc_files/play/etc/systemd/system/encrypt_chatlogs.service
@@ -3,4 +3,4 @@ Description=Attempt encryption of old chat logs
 [Service]
 Type=oneshot
 User=plom
-ExecStart=/bin/sh -c '~/encrypter.sh'
+ExecStart=/bin/sh -c '~/weechatlogs_encrypter.sh'
diff --git a/buster/setup_scripts/setup_play.sh b/buster/setup_scripts/setup_play.sh
old mode 100644
new mode 100755
index c994eb9..d60f6f6
--- a/buster/setup_scripts/setup_play.sh
+++ b/buster/setup_scripts/setup_play.sh
@@ -4,7 +4,7 @@ set -x
 
 if [ "$#" -lt 1 ]; then
   echo "Need public key ID and optionally old server IP."
-  fi
+  false
 fi
 gpg_key="$1"
 old_server="$2"
@@ -16,7 +16,7 @@ cp "${config_tree_prefix}/other_files/weechatrc" /home/plom/.weechatrc
 cp "${config_tree_prefix}/other_files/weechat-wrapper.sh" /home/plom/
 cp "${config_tree_prefix}/other_files/weechatlogs-encrypter.sh" /home/plom/
 chown plom:plom /home/plom/*weechat*
-echo "${gpg_key}" /home/plom/.encrypt_target
+echo "${gpg_key}" > /home/plom/.encrypt_target
 chown plom:plom /home/plom/.encrypt_target
 
 # TODO refactor with setup_website.sh
-- 
2.30.2