Commit Graph

5 Commits

Author SHA1 Message Date
Jeroen De Meerleer 85026a5e7f
Fix incorrect command in check-systemctl-service.sh
The commit fixes a bug in the check-systemctl-service.sh script where the wrong command was being used to list units. The correct command, "systemctl ${user} list-units", is now used instead of "systemctl ${user} list-unit-files". This ensures that the script accurately checks for active services.
2024-02-12 13:03:18 +01:00
Jeroen De Meerleer 050ba916ba
Refactor shell scripts: Remove unnecessary semicolons and add missing case terminators in the GetOptions function. 2023-06-01 16:24:24 +02:00
Jeroen De Meerleer d41ba60101
Refactor command line options for all scripts to include a help option. 2023-06-01 16:15:54 +02:00
Jeroen De Meerleer e849092a4d
Add script name and directory variables to check-systemctl-service.sh
This commit adds two new variables, script_name and script_dir, to the check-systemctl-service.sh file. These variables are used to store the name of the script and its directory path respectively.
2023-06-01 16:09:07 +02:00
Jeroen De Meerleer bdb9ee05e7
Add check-systemctl-service.sh script to check if a systemd unit is active.
This commit adds the check-systemctl-service.sh script which can be used to check if a systemd unit is active. The script takes in a unit file as an argument and has an optional flag to check for running within the current user. It returns exit codes based on whether the service is active, inactive or unknown.
2023-05-26 14:33:11 +02:00