get_instance_name takes base_name now so that it won't confuse moonraker-obico as an instance of Moonraker
This commit is contained in:
@@ -679,8 +679,8 @@ function set_hostname() {
|
||||
### input: /etc/systemd/system/klipper-name.service
|
||||
### returns: name
|
||||
function get_instance_name() {
|
||||
local instance=${1} name
|
||||
name=$(echo "${instance}" | rev | cut -d"/" -f1 | cut -d"-" -f1 | rev | cut -d"." -f1)
|
||||
local instance=${1} base_name=${2} name
|
||||
name=$(echo "${instance}" | rev | cut -d"/" -f1 | cut -d"." -f2 | rev | sed -E "s/${base_name}-//")
|
||||
echo "${name}"
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user