One-command setup (SteamCMD + minqlx build), .env settings with a listed/unlisted switch, three factories (lgvamp, lgvamp_nolag, lgvamp100), warmup-text and welcome minqlx plugins, watchdog/backup/daily-restart, docs for admins and players. Co-Authored-By: Claude Opus 5.5 <[email protected]>
18 lines
746 B
Bash
Executable File
18 lines
746 B
Bash
Executable File
#!/bin/sh
|
|
# Adds the watchdog (every 5 min), backup (04:40) and daily restart (05:00) to your crontab.
|
|
# Safe to run again: replaces its own lines (tagged with this folder's path), leaves others alone.
|
|
# ./scripts/install-cron.sh --remove takes them out again.
|
|
D=$(cd "$(dirname "$0")/.." && pwd)
|
|
TAG="# ql-lg-server $D"
|
|
OLD=$(crontab -l 2>/dev/null | grep -vF "$TAG")
|
|
if [ "$1" = "--remove" ]; then
|
|
printf '%s\n' "$OLD" | crontab - && echo "removed cron lines for $D"; exit 0
|
|
fi
|
|
{
|
|
[ -n "$OLD" ] && printf '%s\n' "$OLD"
|
|
echo "*/5 * * * * $D/scripts/watchdog.sh $TAG"
|
|
echo "40 4 * * * $D/scripts/backup.sh $TAG"
|
|
echo "0 5 * * * $D/scripts/daily-restart.sh $TAG"
|
|
} | crontab -
|
|
echo "cron installed for $D:"; crontab -l | grep -F "$TAG"
|