This repository has been archived on 2023-10-22. You can view files and clone it, but cannot push or open issues or pull requests.
gameserver/scripts/deploy_hedgewars.sh

25 lines
450 B
Bash
Raw Normal View History

2022-02-01 02:37:32 +01:00
#!/bin/bash
set -e
# Hedgewars
# Create SystemD unit
cat > /etc/systemd/system/hedgewars.service <<EOF
[Unit]
Description=Hedgewars server
After=network.target
[Service]
ExecStart=/usr/lib/hedgewars/bin/hedgewars-server
Restart=on-failure
User=${systemuser}
[Install]
WantedBy=multi-user.target
EOF
systemctl daemon-reload
systemctl enable --now hedgewars.service
# Add firewall rules
firewall-cmd --zone=public --add-port=46631/tcp --permanent