Update Install Restic Checks
parent
78d5c272e9
commit
443f0deb85
|
@ -94,18 +94,24 @@ actions:
|
|||
message: Database backup add-on is already installed on ${env.name}. Backup addon installation is not possible.
|
||||
|
||||
installRestic:
|
||||
cmd [cp]: |-
|
||||
if which dnf; then
|
||||
dnf install epel-release
|
||||
dnf install restic
|
||||
cmd [cp]: |-
|
||||
if ! which restic > /dev/null; then
|
||||
echo "Restic not found, installing..."
|
||||
if which dnf > /dev/null; then
|
||||
dnf install -y epel-release
|
||||
dnf install -y restic
|
||||
else
|
||||
yum-config-manager --add-repo https://copr.fedorainfracloud.org/coprs/copart/restic/repo/epel-7/copart-restic-epel-7.repo
|
||||
yum-config-manager --enable copr:copr.fedorainfracloud.org:copart:restic
|
||||
yum -y install restic
|
||||
yum-config-manager --disable copr:copr.fedorainfracloud.org:copart:restic
|
||||
wget -O /etc/logrotate.d/backup-addon ${baseUrl}/scripts/backup-addon;
|
||||
fi
|
||||
user: root
|
||||
else
|
||||
echo "Restic is already installed."
|
||||
fi
|
||||
# Ensure the backup-addon logrotate configuration is always updated
|
||||
wget -O /etc/logrotate.d/backup-addon ${baseUrl}/scripts/backup-addon;
|
||||
user: root
|
||||
|
||||
setSchedule:
|
||||
- setGlobals:
|
||||
|
|
Loading…
Reference in New Issue