diff --git a/utils/systemctl_commands b/utils/systemctl_commands index 6488ad1cecd86bb823a7757fc9704422caa73544..60915d5877f2b53c695b6c83de462b5a3e9d1ac9 100755 --- a/utils/systemctl_commands +++ b/utils/systemctl_commands @@ -1,4 +1,15 @@ #!/bin/bash -domain=`pwd | cut -d'/' -f4` -systemctl `basename "$0"` u@$domain +command=`basename "$0"` +first_level_path=`pwd | cut -d'/' -f2` +second_level_path=`pwd | cut -d'/' -f3` + +if [ "$first_level_path" == "system" ]; then + module=`pwd | cut -d'/' -f3` + systemctl $command s@$module +elif [ "$first_level_path" == "data" ]; then + if [ "$second_level_path" == "domains" ]; then + domain=`pwd | cut -d'/' -f4` + systemctl $command u@$domain + fi +fi