Something went wrong. Try again.
Perl game server for TLE Community
Something went wrong. Try again.
123456789101112131415161718192021#!/bin/bash## Wrapper for the long-running beanstalk scheduler daemons# (schedule_building.pl / schedule_ship_arrival.pl / schedule_captcha.pl).## Under compose these run --nodaemonize, so App::Daemon never redirects and their# output would live only in `docker logs`. This tees combined stdout+stderr to# the shared log tree (log/scheduler/<script>.log on the host) while keeping it# in `docker logs` too. `exec` leaves perl as PID 1 so `docker stop` -> SIGTERM# reaches it directly.#set -euo pipefail
cd /home/lacuna/server/bin
LOG_DIR="${LACUNA_LOG_DIR:-/home/lacuna/server/log}/scheduler"mkdir -p "$LOG_DIR"
script="$1"; shiftexec perl "$script" "$@" > >(tee -a "$LOG_DIR/${script%.pl}.log") 2>&1