diff --git a/cron/gitea/APKBUILD b/cron/gitea/APKBUILD new file mode 100644 index 0000000..5167e8c --- /dev/null +++ b/cron/gitea/APKBUILD @@ -0,0 +1,22 @@ +# Contributor: Alex Denes +# Maintainer: Alex Denes +pkgname=redxen-cron-gitea +pkgver=2020.12.23 +pkgrel=0 +pkgdesc="Gitea backup maintenance scripts" +url="https://git.redxen.eu/RedXen" +arch="noarch" +license="none" +install_if="redxen-config-gitea" +depends="dcron" +source=" + cron-daily +" +options="!check" + +package() { + install -dm700 "$pkgdir"/gitea/snapshots + install -Dm544 cron-daily "$pkgdir"/etc/periodic/daily/snapshot-gitea +} + +sha512sums="60a658eb9db23d7183d1a48d02c6127d2a01cd10b1d9352eb92dcfb91566a18424d3a8d638fb3aeb9b3c16481dc9416f3704f9d6888ced6ac40e111f25ed1c15 cron-daily" diff --git a/cron/gitea/cron-daily b/cron/gitea/cron-daily new file mode 100644 index 0000000..cb9dd49 --- /dev/null +++ b/cron/gitea/cron-daily @@ -0,0 +1,2 @@ +/sbin/btrfs subvolume delete /gitea/snapshots/`date +"%u"` +/sbin/btrfs subvolume snapshot -r /gitea /gitea/snapshots/`date +"%u"`