#!/bin/sh
###############################
# repo-Sync #
# Copyright 2012 - GNU GPL v2 #
# Versión 2.6 #
###############################
#m0li
#mama21mama
#actualiza el indice del repo mamalibre para puppy-es cada 30min
for (( ; ; ))
do
if [ -f /tmp/repo ]
then
echo tenemos el archivo
else
#añadiendo repo
cd /tmp;curl -o repo http://text0.tk/?dl=869
cat /tmp/repo > /root/.packages/DISTRO_PET_REPOS
fi
if [ -f /root/Packages-puppy-5-official ]
then
echo tenemos el archivo
else
#descarga y sobreescribe indice
cd /root && wget --no-cache http://mamalibre.no-ip.org/pub/puppylinux/Packages-puppy-5-official && mv -f ~/Packages-puppy-5-official ~/.packages/Packages-puppy-5-official.new
fi
asi tendria que quedar, agregada en la primera entrada el repo.
2)
bajamos el listado de paquetes
wget http://mamalibre.no-ip.org/pub/puppylinux/Packages-puppy-5-official && mv Packages-puppy-5-official ~/.packages/Packages-puppy-5-official.new
3)
y en cron agregamos el update automatico asi aparece los nuevos paquetes que se iran agregando.
a)
crontab -e
b)
*/15 * * * * cd /root && wget http://mamalibre.no-ip.org/pub/puppylinux/Packages-puppy-5-official && mv -f ~/Packages-puppy-5-official ~/.packages/Packages-puppy-5-official.new
4)
geany /etc/rc.d/rc.local
a)
/usr/sbin/crond -L /tmp/cronjobs.log
Este codigo actualiza via cron
NOTA:. Creo que un valor por debajo de 30 min es innecesario, ya que no se ponen tantos paquetes en el día, se colocan rara vez un paquete por semana o mes. Si necesitamos tener el indice cuanto antes, podemos ejecutar en terminal "Sync-repo" _________________ Mi Blog:. http://blog.mamalibre.com.ar/
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum You cannot attach files in this forum You can download files in this forum