Files
ProxmoxVE/install/duplicati-install.sh
T

53 lines
1.3 KiB
Bash
Raw Normal View History

2025-02-06 19:19:13 +01:00
#!/usr/bin/env bash
# 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
# Source: https://github.com/duplicati/duplicati/
2025-02-06 19:19:13 +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"
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)
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
cleanup_lxc