Fix the bandersnatch element on ubuntu
Use the correct path to httpd conf files for ubuntu. Fix cron filename and permissions so its not ignored. Remove use of "&>>" it doesn't work in dash. Change-Id: Ifa77871903d9a89b53e93d0a81eca1600773cff0
This commit is contained in:
parent
4369880848
commit
3089342a70
|
@ -13,9 +13,15 @@ register-state-path --leave-symlink /srv/pypi/web
|
|||
/usr/local/bin/bandersnatch mirror || true
|
||||
|
||||
# Run bandersnatch every hour
|
||||
echo "0 * * * * root flock -n /var/run/bandersnatch -c \"/usr/local/bin/bandersnatch mirror &>> /var/log/bandersnatch\"" > /etc/cron.d/bandersnatch.cron
|
||||
echo "0 * * * * root flock -n /var/run/bandersnatch -c \"/usr/local/bin/bandersnatch mirror >> /var/log/bandersnatch 2>&1\"" > /etc/cron.d/bandersnatch
|
||||
chmod 755 /etc/cron.d/bandersnatch
|
||||
|
||||
cat > /etc/httpd/conf.d/bandersnatch.conf<<'EOF'
|
||||
HTTPDCONFFILE=/etc/httpd/conf.d/bandersnatch.conf
|
||||
if [ -d /etc/apache2/sites-enabled ]; then
|
||||
HTTPDCONFFILE=/etc/apache2/sites-enabled/bandersnatch.conf
|
||||
fi
|
||||
|
||||
cat > $HTTPDCONFFILE<<'EOF'
|
||||
Alias /pypi /srv/pypi/web
|
||||
<Directory "/srv/pypi/web">
|
||||
Options Indexes
|
||||
|
|
|
@ -4,4 +4,4 @@ set -o pipefail
|
|||
|
||||
# Start building mirror in the background, this can take hours and downloads over 100G of data
|
||||
flock -n /var/run/bandersnatch -c \
|
||||
"/usr/local/bin/bandersnatch mirror &>> /var/log/bandersnatch" &
|
||||
"/usr/local/bin/bandersnatch mirror >> /var/log/bandersnatch 2>&1" &
|
||||
|
|
Loading…
Reference in New Issue