feat: SAC 0.6.0 user edit UI, login to dashboard, daily report timer sync
Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
@@ -122,10 +122,28 @@ else
|
||||
die "${SERVICE_NAME} запущен, но /health не ответил — journalctl -u ${SERVICE_NAME} -n 80 --no-pager"
|
||||
fi
|
||||
|
||||
RENDER_DAILY_TIMER="${APP_ROOT}/deploy/systemd/render-sac-daily-report-timer.sh"
|
||||
if [ -f "${RENDER_DAILY_TIMER}" ]; then
|
||||
chmod +x "${RENDER_DAILY_TIMER}" 2>/dev/null || true
|
||||
fi
|
||||
|
||||
for aux in sac-retention sac-daily-report; do
|
||||
for suffix in service timer; do
|
||||
src="${APP_ROOT}/deploy/systemd/${aux}.${suffix}"
|
||||
dst="/etc/systemd/system/${aux}.${suffix}"
|
||||
if [ "${aux}" = "sac-daily-report" ] && [ "${suffix}" = "timer" ]; then
|
||||
if [ -x "${RENDER_DAILY_TIMER}" ]; then
|
||||
log "Генерация ${dst} из ${CONFIG_FILE} (SAC_DAILY_REPORT_HOUR/TIMEZONE)"
|
||||
bash "${RENDER_DAILY_TIMER}" "${CONFIG_FILE}" "${dst}"
|
||||
systemctl daemon-reload
|
||||
systemctl restart "${aux}.timer" 2>/dev/null || systemctl start "${aux}.timer" 2>/dev/null || true
|
||||
elif [ -f "${src}" ]; then
|
||||
log "WARN: ${RENDER_DAILY_TIMER} не найден — копируем статический timer"
|
||||
cp "${src}" "${dst}"
|
||||
systemctl daemon-reload
|
||||
fi
|
||||
continue
|
||||
fi
|
||||
if [ -f "${src}" ]; then
|
||||
if [ ! -f "${dst}" ] || ! cmp -s "${src}" "${dst}"; then
|
||||
log "Обновление ${dst}"
|
||||
|
||||
Reference in New Issue
Block a user