openmamba-fix-permissions: move cron file from daily to hourly and add new external script

This commit is contained in:
Silvan Calarco 2012-03-12 15:49:03 +01:00
parent ca0db5289e
commit 1a33b8eef4
2 changed files with 24 additions and 0 deletions

View File

@ -0,0 +1,24 @@
#!/bin/bash
#
# Fixes permissions on repositories
# Copyright (c) 2009-2010 by Silvan Calarco <silvan.calarco@mambasoft.it>
#
. /usr/share/makedist/functions.inc.sh
. /etc/sysconfig/openmamba-central
for rep in ${local_reps[*]}; do
getent passwd ftp$rep >/dev/null || {
echo "Warning: missing user ftp$rep for $rep repository; skipping."
continue
}
find /var/ftp/pub/openmamba/$rep/SRPMS.base \
-user ftp$rep -a -group users -o -exec chown ftp$rep:users {} \;
for a in ${archs[*]}; do
[ -e /var/ftp/pub/openmamba/$rep/RPMS.$a ] && \
find /var/ftp/pub/openmamba/$rep/RPMS.$a \
-user ftp$rep -a -group users -o -exec chown ftp$rep:users {} \;
done
# >/dev/null
done
exit 0