edit()
Signed-off-by: fbt <fbt@fleshless.org>
This commit is contained in:
parent
c48486cacf
commit
025d74179b
7
ssm
7
ssm
|
@ -309,6 +309,7 @@ restart() {
|
|||
"$_self" "$service_name" start
|
||||
}
|
||||
|
||||
edit() { "${EDITOR:-vim}" "$service_config"; }
|
||||
logs() { ${PAGER:-less} "$service_logfile"; }
|
||||
|
||||
## Status is a bit of a special case. It's talkative.
|
||||
|
@ -397,9 +398,9 @@ main() {
|
|||
if [[ $1 == /* ]]; then
|
||||
service_config=$1
|
||||
else
|
||||
for i in "${service_path[@]}"; do
|
||||
[[ -f "$i/$1" ]] && {
|
||||
service_config="$i/$1"
|
||||
for i in "${service_path[@]/%//$service_name}"; do
|
||||
[[ -f "$i" ]] && {
|
||||
service_config=$i
|
||||
break
|
||||
}
|
||||
done
|
||||
|
|
Loading…
Reference in New Issue
Block a user