-
Notifications
You must be signed in to change notification settings - Fork 5
Installation
You have 3 ways to install the script:
After that continue with user login and configuration
By installing the repository you will also be able to update the script using the package manager when a new update is available.
Arch based distro
Edit /etc/pacman.conf
and add the following line to the bottom of the file:
Include = /etc/pacman.d/seventhcore-scripts-repo
Then create a new file at /etc/pacman.d/seventhcore-scripts-repo
and add the following content:
[seventhcore-scripts-repo]
SigLevel = Optional TrustAll
Server = https://gitlab.7thcore.eu/7thCore/pkg-repo/-/raw/pkg-arch
Arch users have to install steamcmd from the aur before attempting to install the package.
You can now install the script by running pacman -Sy sesrv-script
Debian based distro
Then create a new file at /etc/apt/sources.list.d/seventhcore-scripts-repo.list
and add the following content:
deb https://gitlab.7thcore.eu/7thCore/pkg-repo/-/raw/pkg-debian stable main
You can now install the script by running apt update
and after that apt install sesrv-script
Download the package and install it.
Arch based distro:
Arch users have to install steamcmd from the aur before attempting to install the package.
sudo pacman -U /path/to/sesrv-script-1.0-1-x86_64.pkg.tar.zst
Debian based distro:
sudo apt install /path/to/sesrv-server_1.0-1_amd64.deb
All the required packages are listed as dependacies in the script package and they will be installed automaticaly
Log in to your server with ssh and execute:
git clone https://github.com/7thCore/sesrv-script
Copy the sesrv script to /usr/bin
cp ./sesrv-script.bash /usr/bin/sesrv-script
User and folder structure creation
Create the sesrv user
useradd --system -g sesrv -d /srv/sesrv/ -s /bin/bash sesrv
Create the folder structure for the server:
mkdir -p /srv/sesrv/{server,config,updates,backups,logs,tmpfs}
mkdir -p /srv/sesrv/.config/systemd/user
Service and timer installation
Copy all the .service and .timer files to the user directory
cp ./*.service /srv/sesrv/.config/systemd/user/
cp ./*.timer /srv/sesrv/.config/systemd/user/
Bash profile installation and permissions configuration
Copy the bash profile to the sesrv directory
cp ./bash_profile /srv/sesrv/.bash_profile
Give file permissions to the user
chown -R sesrv:sesrv /srv/sesrv
Configure user service
Start the user service and enable linger
loginctl enable-linger sesrv
systemctl start user@$(id -u sesrv).service
sudo -i -u sesrv
sesrv-script config_script