diff --git a/README.md b/README.md index 5e16ae0..b3dfbee 100644 --- a/README.md +++ b/README.md @@ -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 diff --git a/enable-services.sh b/enable-services.sh new file mode 100755 index 0000000..1ee5b82 --- /dev/null +++ b/enable-services.sh @@ -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 \ No newline at end of file diff --git a/restart-services.sh b/restart-services.sh new file mode 100755 index 0000000..4425a39 --- /dev/null +++ b/restart-services.sh @@ -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 \ No newline at end of file