Files
esefandClaude Opus 5.5 7e9cbee14d cs16-dm-server: CS 1.6 deathmatch server in Docker
One-command setup (SteamCMD + pinned, checksum-verified ReHLDS / ReGameDLL /
Metamod-R / AMXX / ReAPI / ReUnion / CSDM-ReAPI / YaPB / GunGame), .env
settings, ./cs menu (map, DM/GunGame mode, bots, kill counter, restart,
update), own plugins (extras, rtv, mode switch), all-time kill counter,
watchdog + nightly backup, docs for admins and players.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-10-11 05:03:07 +03:00

17 lines
707 B
Bash
Executable File

#!/bin/sh
# Adds the watchdog (every 5 min) and the backup (04:30) 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="# cs16-dm-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 "30 4 * * * $D/scripts/backup.sh >> $D/backups/backup.log 2>&1 $TAG"
} | crontab -
echo "cron installed for $D:"; crontab -l | grep -F "$TAG"