Skip to content

Server Routines

The following Routines are recommended for a seamless server experience:

  • CronTab
    • Savednades.json Backup Utility - Backup savednades from MatchZy at midnight
  • Systemd/SystemCTL
    • Discord Slash Commands - Start on system startup
    • CS2 Server - Start on system startup
    • MatchZy Discord Bot

Configuring CronJobs

Savednades.json - x days backup

sudo crontab -e
Under the commented section, add the following:
0 0 * * * /backup_savednades_10day.sh

This will run the /backup_savednades_10day.sh everyday at midnight

Configuring Systemd for StartUp services

Discord Slash Commands

sudo nano /etc/systemd/system/py-discordBot.service

[Unit]
Description=Custom Python Slash Commands

[Service]
Type=simple
ExecStart=/usr/bin/python3 /customSlashCommands.py
Restart=always

[Install]
WantedBy=multi-user.target
This ensures the Custom slash commands you make will continue to work when your physical server starts.

CS2 Server Startup

sudo nano /etc/systemd/system/cs2server.service

[Unit]
Description=Server StartUp Service
After=network.target

[Service]
User=steam
Group=steam
WorkingDirectory=/
ExecStart=/usr/bin/screen -dmS cs2server /run.sh

[Install]
WantedBy=multi-user.target
This ensures the CS2 Server reboots after physical server starts. Run sudo screen -x cs2server in terminal to see the server console.

MatchZy Discord Bot

> sudo systemctl enable docker.service
> sudo systemctl enable containerd.service