add files to enable and restart services.

This commit is contained in:
Marco Cawthorne 2023-11-18 09:57:55 -08:00
parent 5a027ad146
commit 3caf15949a
Signed by: eukara
GPG key ID: CE2032F0A2882A22
3 changed files with 26 additions and 9 deletions

View file

@ -21,15 +21,14 @@ You can also run `./install-services.sh` to install the systemd service files.
From then on you can enable them all like this:
sudo systemctl enable freehl-cstrike
sudo systemctl enable freehl-dmc
sudo systemctl enable freehl-gearbox
sudo systemctl enable freehl-hunger
sudo systemctl enable freehl-rewolf
sudo systemctl enable freehl-scihunt
sudo systemctl enable freehl-tfc
sudo systemctl enable freehl-valve
`./enable-services.sh`
etc.
...to restart/launch them:
`./restart-services.sh`
etc. - you will figure it out
-- eukara

9
enable-services.sh Executable file
View file

@ -0,0 +1,9 @@
#!/bin/sh
SERVICE_DIR="/etc/systemd/system"
find ./ -type f -name '*.service' -print | while read LINE
do
FILE=$(basename "$LINE" | cut -d '.' -f 1)
systemctl enable "$FILE"
done

9
restart-services.sh Executable file
View file

@ -0,0 +1,9 @@
#!/bin/sh
SERVICE_DIR="/etc/systemd/system"
find ./ -type f -name '*.service' -print | while read LINE
do
FILE=$(basename "$LINE" | cut -d '.' -f 1)
systemctl restart "$FILE"
done