#!/bin/sh # cron: 0 3 * * 0 /opt/zlattea/scripts/refresh-couriers.sh # syncs econt + speedy office lists into the db set -e cd /opt/zlattea bun -e ' const { refreshAllOffices } = require("./src/lib/couriers"); refreshAllOffices().then(n => { console.log(`courier sync: econt=${n.econt} speedy=${n.speedy}`); process.exit(0); }).catch(e => { console.error("courier sync failed:", e.message); process.exit(1); }); '