diff options
-rwxr-xr-x | scripts/update_repo.sh | 5 | ||||
-rw-r--r-- | unitfiles/aurbuilder-package.service | 1 | ||||
-rw-r--r-- | unitfiles/aurbuilder-repo.service | 11 |
3 files changed, 17 insertions, 0 deletions
diff --git a/scripts/update_repo.sh b/scripts/update_repo.sh new file mode 100755 index 0000000..04e697e --- /dev/null +++ b/scripts/update_repo.sh @@ -0,0 +1,5 @@ +#!/bin/bash + +OUTPUT=${OUTPUT:-/srv/pkg/} +repo-add -pR "$OUTPUT/repo.db.tar.gz" "$OUTPUT/*.pkg.*" +rm "$OUTDIR/*.old" diff --git a/unitfiles/aurbuilder-package.service b/unitfiles/aurbuilder-package.service index 228e87a..93cd838 100644 --- a/unitfiles/aurbuilder-package.service +++ b/unitfiles/aurbuilder-package.service @@ -9,3 +9,4 @@ ExecStart=/usr/lib/aurbuilder/build_packages.sh Restart=no StartLimitInterval=10min StartLimitBurst=8 +OnSuccess=aurbuilder-repo.service diff --git a/unitfiles/aurbuilder-repo.service b/unitfiles/aurbuilder-repo.service new file mode 100644 index 0000000..7b6c157 --- /dev/null +++ b/unitfiles/aurbuilder-repo.service @@ -0,0 +1,11 @@ +[Unit] +Description=aurbuilder Update repository database + +[Service] +Type=simple +User=aurbuilder +Group=aurbuilder +ExecStart=/usr/lib/aurbuilder/update_repo.sh +Restart=no +StartLimitInterval=10min +StartLimitBurst=8 |