universal restart command!
This commit is contained in:
parent
5fcd6369d7
commit
873418e24b
1 changed files with 13 additions and 2 deletions
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue