REPO_ROOT="/var/www/html"
GPGP_FILE="/home/repo/.private/ggg.txt"
MAIN_DISTROS="Debian Ubuntu"
+REPO_USER=repo
+REPO_GROUP=users
if [[ ! -d "${REPO_ROOT}" ]] ; then
echo "Directory '${REPO_ROOT}' doesn't exists." >&2
exit 5
fi
+I_AM_ROOT="n"
+if [[ "$( id -u )" == "0" ]] then
+ I_AM_ROOT="y"
+fi
for mdistro in ${MAIN_DISTROS} ; do
chmod -R -v g+w "${d}"
+ if [[ "${I_AM_ROOT}" == "y" ]] ; then
+ chown -v ${REPO_USER}:${REPO_GROUP} Packages* Release*
+ fi
+
done
done
rm -fv Release.gpg
gpg --output Release.gpg -u B796E12A --armor --detach-sign --batch --pinentry-mode loopback --passphrase-file "${GPGP_FILE}" Release
+ if [[ "${I_AM_ROOT}" == "y" ]] ; then
+ chown -v ${REPO_USER}:${REPO_GROUP} Sources* Release*
+ fi
+
fi