GNAI-025: Fluxer-Chat-LXC CT 117 — komplett in Betrieb (fluxer.ghostnet.selfhost.eu) #21

Merged
spektr merged 72 commits from lxc/ct-117-gnai-025-fluxer-chat into main 2026-11-30 04:49:27 +01:00
3 changed files with 9 additions and 4 deletions
Showing only changes of commit 21e410e8cd - Show all commits
@@ -5,7 +5,6 @@ Description=Monthly restic check of the Litecoin wallet backup repository
Type=oneshot
Environment=RESTIC_REPOSITORY={{ litecoin_backup_repository }}
Environment=RESTIC_PASSWORD_FILE={{ litecoin_backup_password_file }}
Environment=HOME={{ litecoin_backup_env_dir }}
Environment=SSH_AUTH_SOCK=
ExecStart=/usr/bin/restic check --read-data-subset=5%
ExecStart=/usr/bin/restic -o sftp.command="ssh -i {{ litecoin_backup_ssh_key }} -o IdentitiesOnly=yes -o BatchMode=yes -o StrictHostKeyChecking=yes -o UserKnownHostsFile={{ litecoin_backup_known_hosts }}" check --read-data-subset=5%
Nice=10
@@ -5,7 +5,7 @@ After=litecoind.service
[Service]
Type=oneshot
ExecStart={{ litecoin_backup_script }}
# SSH key for the restic sftp target, root-only.
Environment=HOME={{ litecoin_backup_env_dir }}
# Runs as root; the script passes the restic SSH key and known_hosts
# explicitly via restic's sftp.command (ssh ignores $HOME for ~).
Environment=SSH_AUTH_SOCK=
Nice=10
@@ -10,6 +10,10 @@ set -Eeuo pipefail
export RESTIC_REPOSITORY="{{ litecoin_backup_repository }}"
export RESTIC_PASSWORD_FILE="{{ litecoin_backup_password_file }}"
# ssh resolves ~ from the passwd entry, not from $HOME, so the restic sftp
# backend gets the key and known_hosts explicitly via sftp.command.
SFTP_COMMAND="ssh -i {{ litecoin_backup_ssh_key }} -o IdentitiesOnly=yes -o BatchMode=yes -o StrictHostKeyChecking=yes -o UserKnownHostsFile={{ litecoin_backup_known_hosts }}"
backup_dir="{{ litecoin_backup_wallet_dir }}"
today="$(date +%F)"
@@ -18,9 +22,11 @@ today="$(date +%F)"
backupwallet "${backup_dir}/wallet-${today}"
/usr/bin/restic -r "$RESTIC_REPOSITORY" \
-o "sftp.command=$SFTP_COMMAND" \
--password-file "$RESTIC_PASSWORD_FILE" \
backup "$backup_dir"
/usr/bin/restic -r "$RESTIC_REPOSITORY" \
-o "sftp.command=$SFTP_COMMAND" \
--password-file "$RESTIC_PASSWORD_FILE" \
forget --keep-daily {{ litecoin_backup_keep_daily }} --prune