45-autodist-git-sync: added daily cron file for autodist-git repository sync

This commit is contained in:
Silvan Calarco 2024-01-06 13:07:48 +01:00
parent 07285b0cc7
commit cafa354501
2 changed files with 13 additions and 0 deletions

View File

@ -105,6 +105,7 @@ install-data:
@$(INSTALL_SCRIPT) etc/cron.hourly/65-autoport $(DESTDIR)$(sysconfdir)/cron.hourly/
@$(INSTALL_SCRIPT) etc/cron.daily/40-autodist-cleanold $(DESTDIR)$(sysconfdir)/cron.daily/
@$(INSTALL_SCRIPT) etc/cron.daily/40-autodist-upstream-updates $(DESTDIR)$(sysconfdir)/cron.daily/
@$(INSTALL_SCRIPT) etc/cron.daily/45-autodist-git-sync $(DESTDIR)$(sysconfdir)/cron.daily/
@$(INSTALL_SCRIPT) etc/logrotate.d/webbuild $(DESTDIR)$(sysconfdir)/logrotate.d/webbuild
@$(INSTALL_DATA) autospec-conf $(DESTDIR)$(pck_statedir)/.autospec
@$(INSTALL_DATA) autodist-bashrc $(DESTDIR)$(pck_statedir)/.bashrc

View File

@ -0,0 +1,12 @@
#!/bin/bash
#
# autodist-git-sync daily cron script
# (c) 2024 by Silvan Calarco <silvan.calarco@mambasoft.it>
#
. /etc/autodist/config
if [ "$AUTODIST_GIT_SYNC" == "1" ]; then
autodist-git syncrepo
fi
exit 0