mirror of
https://github.com/rocky-linux/rocky-tools.git
synced 2024-11-25 14:41:25 +00:00
Update mirrorsync.sh
Changed slashes path composition
This commit is contained in:
parent
b5d7170a04
commit
2c764f7532
@ -47,12 +47,12 @@ SRC="msync.rockylinux.org::rocky/mirror/pub/rocky/"
|
|||||||
# Your local path. Change to whatever fits your system.
|
# Your local path. Change to whatever fits your system.
|
||||||
# MIRRORMODULE is also used in syslog output.
|
# MIRRORMODULE is also used in syslog output.
|
||||||
MIRRORMODULE="rocky-linux"
|
MIRRORMODULE="rocky-linux"
|
||||||
DST="/mnt/mirrorserver/${MIRRORMODULE}/"
|
DST="/mnt/mirrorserver/${MIRRORMODULE}"
|
||||||
|
|
||||||
FILELISTFILE="/fullfiletimelist-rocky"
|
FILELISTFILE="fullfiletimelist-rocky"
|
||||||
LOCKFILE=$0.lockfile
|
LOCKFILE=$0.lockfile
|
||||||
|
|
||||||
CHECKRESULT=`${RSYNC} --no-motd --dry-run --out-format='%n' ${SRC}${FILELISTFILE} ${DST}${FILELISTFILE}`
|
CHECKRESULT=`${RSYNC} --no-motd --dry-run --out-format='%n' ${SRC}${FILELISTFILE} ${DST}/${FILELISTFILE}`
|
||||||
if [ -z $CHECKRESULT ]; then
|
if [ -z $CHECKRESULT ]; then
|
||||||
echo "${FILELISTFILE} unchanged. Not updating at " `date` >> $0.log 2>&1
|
echo "${FILELISTFILE} unchanged. Not updating at " `date` >> $0.log 2>&1
|
||||||
logger -t rsync "Not updating ${MIRRORMODULE}: ${FILELISTFILE} unchanged."
|
logger -t rsync "Not updating ${MIRRORMODULE}: ${FILELISTFILE} unchanged."
|
||||||
@ -68,7 +68,7 @@ else
|
|||||||
echo "Started update at" `date` >> $0.log 2>&1
|
echo "Started update at" `date` >> $0.log 2>&1
|
||||||
logger -t rsync "Updating ${MIRRORMODULE}"
|
logger -t rsync "Updating ${MIRRORMODULE}"
|
||||||
|
|
||||||
${RSYNC} ${OPTS} ${SRC} ${DST} >> $0.log 2>&1
|
${RSYNC} ${OPTS} ${SRC} ${DST}/ >> $0.log 2>&1
|
||||||
logger -t rsync "Finished updating ${MIRRORMODULE}"
|
logger -t rsync "Finished updating ${MIRRORMODULE}"
|
||||||
echo "End: "`date` >> $0.log 2>&1
|
echo "End: "`date` >> $0.log 2>&1
|
||||||
rm $LOCKFILE
|
rm $LOCKFILE
|
||||||
|
Loading…
Reference in New Issue
Block a user