debian-repository-change.sh
· 946 B · Bash
Raw
# This quickly changes from the old packager.io to the new packager.io repository
# Commands require sudo / root permissions
# Drop existing GPG-Key and Repository-File
rm -f /etc/apt/trusted.gpg.d/pkgr-zammad.gpg /etc/apt/sources.list.d/zammad.list
# Download the new Keyring
curl -fsSL "https://go.packager.io/srv/deb/zammad/zammad/gpg-key.gpg" \
-o /usr/share/keyrings/zammad.gpg
# Get VERSION_ID of OS
OSV=$(grep '^VERSION_ID' /etc/os-release| cut -d'=' -f2 | tr -d '\"')
# Download the new repository file
# stable
curl -fsSL "https://go.packager.io/srv/zammad/zammad/stable/installer/debian/${OSV}.list" \
-o /etc/apt/sources.list.d/zammad.list
# develop (Do not use in production)
curl -fsSL "https://go.packager.io/srv/zammad/zammad/develop/installer/debian/${OSV}.list" \
-o /etc/apt/sources.list.d/zammad.list
# Refresh Sources and Upgrade packages
apt update
apt upgrade
# Alternatively only for Zammad:
apt install zammad
| 1 | # This quickly changes from the old packager.io to the new packager.io repository |
| 2 | # Commands require sudo / root permissions |
| 3 | |
| 4 | # Drop existing GPG-Key and Repository-File |
| 5 | rm -f /etc/apt/trusted.gpg.d/pkgr-zammad.gpg /etc/apt/sources.list.d/zammad.list |
| 6 | |
| 7 | # Download the new Keyring |
| 8 | curl -fsSL "https://go.packager.io/srv/deb/zammad/zammad/gpg-key.gpg" \ |
| 9 | -o /usr/share/keyrings/zammad.gpg |
| 10 | |
| 11 | # Get VERSION_ID of OS |
| 12 | OSV=$(grep '^VERSION_ID' /etc/os-release| cut -d'=' -f2 | tr -d '\"') |
| 13 | |
| 14 | # Download the new repository file |
| 15 | # stable |
| 16 | curl -fsSL "https://go.packager.io/srv/zammad/zammad/stable/installer/debian/${OSV}.list" \ |
| 17 | -o /etc/apt/sources.list.d/zammad.list |
| 18 | |
| 19 | # develop (Do not use in production) |
| 20 | curl -fsSL "https://go.packager.io/srv/zammad/zammad/develop/installer/debian/${OSV}.list" \ |
| 21 | -o /etc/apt/sources.list.d/zammad.list |
| 22 | |
| 23 | # Refresh Sources and Upgrade packages |
| 24 | apt update |
| 25 | apt upgrade |
| 26 | |
| 27 | # Alternatively only for Zammad: |
| 28 | apt install zammad |