2025-02-06 19:19:13 +01:00
|
|
|
#!/usr/bin/env bash
|
|
|
|
|
|
2026-01-06 13:28:12 +01:00
|
|
|
# Copyright (c) 2021-2026 community-scripts ORG
|
2025-02-06 19:19:13 +01:00
|
|
|
# Author: tremor021
|
|
|
|
|
# License: MIT | https://github.com/community-scripts/ProxmoxVE/raw/main/LICENSE
|
2025-03-04 17:54:20 +01:00
|
|
|
# Source: https://github.com/duplicati/duplicati/
|
2025-02-06 19:19:13 +01:00
|
|
|
|
2025-03-24 14:20:56 +01:00
|
|
|
source /dev/stdin <<<"$FUNCTIONS_FILE_PATH"
|
2025-02-06 19:19:13 +01:00
|
|
|
color
|
|
|
|
|
verb_ip6
|
|
|
|
|
catch_errors
|
|
|
|
|
setting_up_container
|
|
|
|
|
network_check
|
|
|
|
|
update_os
|
|
|
|
|
|
|
|
|
|
msg_info "Installing Dependencies"
|
2026-01-23 08:43:48 +01:00
|
|
|
$STD apt install -y \
|
2025-02-06 19:19:13 +01:00
|
|
|
libice6 \
|
|
|
|
|
libsm6 \
|
|
|
|
|
libfontconfig1
|
|
|
|
|
msg_ok "Installed Dependencies"
|
|
|
|
|
|
2026-06-19 17:53:08 +10:00
|
|
|
fetch_and_deploy_gh_release "duplicati" "duplicati/duplicati" "binary" "latest" "/opt/duplicati" "duplicati-*-linux-$(arch_resolve "x64" "arm64")-gui.deb"
|
2025-02-06 19:19:13 +01:00
|
|
|
|
2025-07-24 21:00:41 +02:00
|
|
|
msg_info "Configuring duplicati"
|
2026-10-03 08:19:10 +02:00
|
|
|
DECRYPTKEY=$(random_password 13)
|
|
|
|
|
ADMINPASS=$(random_password 13)
|
2026-06-30 13:01:18 +02:00
|
|
|
cat <<EOF >~/duplicati.creds
|
|
|
|
|
Admin password = ${ADMINPASS}
|
|
|
|
|
Database encryption key = ${DECRYPTKEY}
|
|
|
|
|
EOF
|
2025-07-24 21:00:41 +02:00
|
|
|
msg_ok "Configured duplicati"
|
2025-02-06 19:19:13 +01:00
|
|
|
|
|
|
|
|
msg_info "Creating Service"
|
|
|
|
|
cat <<EOF >/etc/systemd/system/duplicati.service
|
|
|
|
|
[Unit]
|
|
|
|
|
Description=Duplicati Service
|
|
|
|
|
After=network.target
|
|
|
|
|
|
|
|
|
|
[Service]
|
|
|
|
|
ExecStart=/usr/bin/duplicati-server --webservice-interface=any --webservice-password=$ADMINPASS --settings-encryption-key=$DECRYPTKEY
|
|
|
|
|
Restart=always
|
|
|
|
|
|
|
|
|
|
[Install]
|
|
|
|
|
WantedBy=multi-user.target
|
|
|
|
|
EOF
|
|
|
|
|
systemctl enable -q --now duplicati
|
|
|
|
|
msg_ok "Created Service"
|
|
|
|
|
|
|
|
|
|
motd_ssh
|
|
|
|
|
customize
|
2025-11-22 17:27:13 +01:00
|
|
|
cleanup_lxc
|