Update Install Restic Checks
parent
78d5c272e9
commit
443f0deb85
|
@ -95,16 +95,22 @@ actions:
|
||||||
|
|
||||||
installRestic:
|
installRestic:
|
||||||
cmd [cp]: |-
|
cmd [cp]: |-
|
||||||
if which dnf; then
|
if ! which restic > /dev/null; then
|
||||||
dnf install epel-release
|
echo "Restic not found, installing..."
|
||||||
dnf install restic
|
if which dnf > /dev/null; then
|
||||||
|
dnf install -y epel-release
|
||||||
|
dnf install -y restic
|
||||||
else
|
else
|
||||||
yum-config-manager --add-repo https://copr.fedorainfracloud.org/coprs/copart/restic/repo/epel-7/copart-restic-epel-7.repo
|
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-config-manager --enable copr:copr.fedorainfracloud.org:copart:restic
|
||||||
yum -y install restic
|
yum -y install restic
|
||||||
yum-config-manager --disable copr:copr.fedorainfracloud.org:copart:restic
|
yum-config-manager --disable copr:copr.fedorainfracloud.org:copart:restic
|
||||||
wget -O /etc/logrotate.d/backup-addon ${baseUrl}/scripts/backup-addon;
|
|
||||||
fi
|
fi
|
||||||
|
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
|
user: root
|
||||||
|
|
||||||
setSchedule:
|
setSchedule:
|
||||||
|
|
Loading…
Reference in New Issue