From: Christian Heller Date: Sat, 15 Dec 2018 17:54:03 +0000 (+0100) Subject: Fix play server setup. X-Git-Url: https://plomlompom.com/repos/%7B%7Bprefix%7D%7D/%7B%7Bdb.prefix%7D%7D/condition?a=commitdiff_plain;h=60e6aeb6b26bd7b810deb8c53fe696022cb673b4;p=config Fix play server setup. --- diff --git a/all_new_2018/setup_play.sh b/all_new_2018/setup_play.sh old mode 100644 new mode 100755 index b5e801b..233219d --- a/all_new_2018/setup_play.sh +++ b/all_new_2018/setup_play.sh @@ -8,13 +8,14 @@ if [ $# -lt 1 ]; then fi gpg_key="$1" +./hardlink_etc.sh play config_tree_prefix="${HOME}/config/all_new_2018/" apt -y install weechat screen vim -cp "${config_tree_prefix}user_files/encrypter.sh /home/plom/" +cp "${config_tree_prefix}user_files/encrypter.sh" /home/plom/ chown plom:plom /home/plom/encrypter.sh -cp "${config_tree_prefix}user_files/weechat-wrapper.sh /home/plom/" +cp "${config_tree_prefix}user_files/weechat-wrapper.sh" /home/plom/ chown plom:plom /home/plom/weechat-wrapper.sh -cp "${config_tree_prefix}user_files/weechatrc /home/plom/.weechatrc" +cp "${config_tree_prefix}user_files/weechatrc" /home/plom/.weechatrc chown plom:plom /home/plom/.weechatrc apt -y install screen gnupg dirmngr keyservers='sks-keyservers.net/ keys.gnupg.net' @@ -37,4 +38,5 @@ set -e echo "$gpg_key" > /home/plom/.encrypt_target chown plom:plom /home/plom/.encrypt_target # TODO: We may remove dirmngr here if only this script installed it. -service encrypt_chatlogs.timer start +systemctl daemon-reload +systemctl start encrypt_chatlogs.timer diff --git a/all_new_2018/user_files/encrypter.sh b/all_new_2018/user_files/encrypter.sh old mode 100644 new mode 100755 index 6a35954..e2ebd44 --- a/all_new_2018/user_files/encrypter.sh +++ b/all_new_2018/user_files/encrypter.sh @@ -1,4 +1,9 @@ #!/bin/sh +# Encrypt dated weechatlog files older than one day to GPG target defined in +# ~/.encrypt_target set -e gpg_key=$(cat ~/.encrypt_target) +cd ~/weechatlogs/irc/ +find . -regextype posix-egrep -regex '^.*/.*/.*\.[0-9]{4}-[0-9]{2}-[0-9]{2}\.weechatlog$' -type f -mtime +1 -exec gpg --recipient "${gpg_key}" --trust-model always --encrypt {} \; -exec rm {} \; +