19 lines
456 B
Bash
Executable file
19 lines
456 B
Bash
Executable file
#!/bin/bash
|
|
|
|
relative_path="$(dirname "$0")"
|
|
|
|
|
|
# Install nftables if not already installed.
|
|
sudo which nft > /dev/null || sudo apt install -y nftables
|
|
|
|
|
|
# Copy nftables.conf & sytemd service files.
|
|
sudo cp "$relative_path/nftables.conf" /etc/nftables.conf
|
|
|
|
sudo cp "$relative_path/arkserver.service" /etc/systemd/system/arkserver.service
|
|
|
|
|
|
# Enable & start both services.
|
|
sudo systemctl enable arkserver nftables
|
|
|
|
sudo systemctl restart arkserver nftables
|