update_index.sh (444B)
1 #!/bin/bash 2 BASEDIR="$1" 3 4 cd "${BASEDIR}" 5 LOCKFILE="${BASEDIR}/crawl.lock" 6 LOGFILE="${BASEDIR}/crawl.log" 7 8 if [[ -f "${LOCKFILE}" ]]; 9 then 10 echo "Lockfile is there, exiting" 11 exit 12 fi 13 14 touch "${LOCKFILE}" 15 rm -f "${LOGFILE}" 16 "${BASEDIR}/infra/filter_seed_request.sh" "${BASEDIR}" 17 18 /home/gus/.local/bin/poetry run crawl 19 /home/gus/.local/bin/poetry run build_index 20 /usr/bin/systemctl --user restart gus >> "${LOGFILE}" 2>&1 21 22 rm "${LOCKFILE}"