The name extraction should work in case of service-name-with-hyphon-name.service
This commit is contained in:
@@ -680,7 +680,7 @@ function set_hostname() {
|
||||
### returns: name
|
||||
function get_instance_name() {
|
||||
local instance=${1} name
|
||||
name=$(echo "${instance}" | rev | cut -d"/" -f1 | rev | cut -d"-" -f2 | cut -d"." -f1)
|
||||
name=$(echo "${instance}" | rev | cut -d"/" -f1 | cut -d"-" -f1 | rev | cut -d"." -f1)
|
||||
echo "${name}"
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user