]> git.corax.cc Git - foundry/commitdiff
foundry: Remove the need to explicitly configure process names
authorMatthias Kruk <m@m10k.eu>
Sun, 25 Jul 2021 05:08:19 +0000 (14:08 +0900)
committerMatthias Kruk <m@m10k.eu>
Sun, 25 Jul 2021 05:08:19 +0000 (14:08 +0900)
Foundry requires the process configurations to specify a process
name that is equal to the name of the configuration, otherwise
running processes are not correctly detected. Since the user is not
free to specify any name they want, it does not make sense to
require the user to configure the process name at all.
This commit changes the foundry implementation so that the name of
the config domain is used as the process name, doing away with the
need to explicitly configure the process name.

foundry.sh

index 831f515733377524c3d246e5be4f8e57a1e3f802..06eb51fa4a784a72a15322e66dda3c09520eaa05 100755 (executable)
@@ -110,6 +110,10 @@ process_is_running() {
                if [[ "$proc" == *" --name $process "* ]]; then
                        return 0
                fi
+
+               if [[ "$proc" == *" --name $process" ]]; then
+                       return 0
+               fi
        done < <(inst_list "$command")
 
        return 1
@@ -122,11 +126,9 @@ process_start() {
        local args
                local param
 
-       args=()
+       args=("--name" "$process")
        command=""
 
-       conf_get_names "$process" | log_highlight "config names" | log_debug
-
        while read -r param; do
                local value