mirror: Shellcheck fixes for sync-mirrors
This commit is contained in:
parent
5f8723c9c9
commit
7fc06236e4
1 changed files with 4 additions and 10 deletions
|
@ -15,7 +15,7 @@ logmsg() {
|
|||
}
|
||||
|
||||
if [ -d ${CONFDIR} ]; then
|
||||
MIRRORLIST="$(find ${CONFDIR}/ -name \*.conf | while read f ; \
|
||||
MIRRORLIST="$(find ${CONFDIR}/ -name \*.conf | while read -r f ; \
|
||||
do basename "${f}" | sed -e 's/\.conf$//' ; done)"
|
||||
if [ "${MIRRORLIST}" = "" ]; then
|
||||
echo "ERR: No configured mirrors found" 1>&2
|
||||
|
@ -80,14 +80,8 @@ fi
|
|||
umask 022
|
||||
|
||||
if [ -f "${LOCKFILE}" ]; then
|
||||
kill -0 "$(cat ${LOCKFILE})"
|
||||
if [ $? -ne 1 ]; then
|
||||
which stat > /dev/null 2>&1
|
||||
if [ $? -eq 0 ]; then
|
||||
if kill -0 "$(cat ${LOCKFILE})" ; then
|
||||
STARTED=" ($(stat --format='%y' ${LOCKFILE}))"
|
||||
else
|
||||
STARTED=""
|
||||
fi
|
||||
echo "ERR: Lockfile exists${STARTED}, exiting" 1>&2
|
||||
exit 1
|
||||
else
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue