aur/duplicati.install
2024-09-17 21:29:33 -04:00

105 lines
3.8 KiB
Text

post_install() {
mkdir -p /var/lib/duplicati
chown -R duplicati:duplicati /var/lib/duplicati
cat <<EOF
* UI can be accessed via following URL: http://localhost:8200
* Running duplicati user instance (using current user account)
- set up database password: systemctl --user edit duplicati
[Service]
Environment="SETTINGS_ENCRYPTION_KEY=<your_password_here>"
(see https://github.com/duplicati/duplicati/releases/tag/v2.0.9.106_canary_2024-09-03 for details)
- to start duplicati manually: systemctl --user start duplicati
- to autostart duplicati on user login: systemctl --user enable duplicati
*
* To run Duplicati.Server.exe as root, simply use systemd's "drop-in" feature
* and specify
* User=root
* Group=root
EOF
}
## arg 1: the new package version
## arg 2: the old package version
post_upgrade() {
mkdir -p /var/lib/duplicati
chown -R duplicati:duplicati /var/lib/duplicati
if [ $(vercmp $2 2.0.2.10-1) -lt 0 ]; then
cat <<EOF
* In versions prior to 2.0.2.10-1, the system version of duplicati.service
* started Duplicati.Server.exe as root. It now runs as user duplicati.
* Please move your old duplicati database from
* /root/.config/Duplicati
* to
* /var/lib/duplicati/.config/Duplicati
* To run Duplicati.Server.exe as root, simply use systemd's "drop-in" feature
* and specify
* User=root
* Group=root
EOF
fi
if [ $(vercmp $2 2.0.5.113-1) -lt 0 ]; then
cat <<EOF
* In versions 2.0.5.113 and above, the Telegram backend has been removed, and
* the SSH backend has increased its encryption algorithm requirements, which may
* break backups. See https://github.com/duplicati/duplicati/releases/tag/v2.0.5.113-2.0.5.113_canary_2021-03-07
* for details, and downgrade to an earlier version if necessary.
EOF
fi
if [ $(vercmp $2 2.0.6.104-5) -lt 0 ]; then
cat <<EOF
* This package was renamed from duplicati-latest to duplicati-canary-bin starting
* from 2.0.6.104-5. The install path was also changed from /opt/duplicati-latest to
* /opt/duplicati, so please update any scripts that referred to the installation
* directory directly.
EOF
fi
if [ $(vercmp $2 2.0.9.101-1) -lt 0 ]; then
cat <<EOF
* Version 2.0.9.101-1 was a major overhaul of the code organization, and now includes
* a vendored .NET runtime. The name of the binaries also changed.
* Please report any issues on the AUR.
* https://aur.archlinux.org/packages/duplicati-canary-bin
EOF
fi
if [ $(vercmp $2 2.0.9.102-1) -lt 0 ]; then
cat <<EOF
* Version 2.0.9.102 changes the webserver, and now requires authentication to use
* the default http://localhost:8200. The TrayIcon service will authenticate for you,
* but see https://github.com/duplicati/duplicati/releases/tag/v2.0.9.102_canary_2024-08-02
* for more details.
EOF
fi
if [ $(vercmp $2 2.0.9.106-1) -lt 0 ]; then
cat <<EOF
* Version 2.0.9.106 changes the way the database is encrypted. The previously
* automatically generated password will not work. You will need to provide a
* password for the database using the environment variable SETTINGS_ENCRYPTION_KEY.
* See https://github.com/duplicati/duplicati/releases/tag/v2.0.9.106_canary_2024-09-03 for details.
* One way to provide the environment variable is by running
* systemctl --user edit duplicati and adding
[Service]
Environment="SETTINGS_ENCRYPTION_KEY=<your_password_here>"
EOF
fi
cat <<EOF
* UI can be accessed via following URL: http://localhost:8200
* Running duplicati user instance (using current user account)
- to reload user systemd modules: systemctl --user daemon-reload
- to start duplicati manually: systemctl --user start duplicati
- to autostart duplicati on user login: systemctl --user enable duplicati
EOF
}