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
|
"$_self" "$service_name" start
|
||||||
}
|
}
|
||||||
|
|
||||||
|
edit() { "${EDITOR:-vim}" "$service_config"; }
|
||||||
logs() { ${PAGER:-less} "$service_logfile"; }
|
logs() { ${PAGER:-less} "$service_logfile"; }
|
||||||
|
|
||||||
## Status is a bit of a special case. It's talkative.
|
## Status is a bit of a special case. It's talkative.
|
||||||
|
@ -397,9 +398,9 @@ main() {
|
||||||
if [[ $1 == /* ]]; then
|
if [[ $1 == /* ]]; then
|
||||||
service_config=$1
|
service_config=$1
|
||||||
else
|
else
|
||||||
for i in "${service_path[@]}"; do
|
for i in "${service_path[@]/%//$service_name}"; do
|
||||||
[[ -f "$i/$1" ]] && {
|
[[ -f "$i" ]] && {
|
||||||
service_config="$i/$1"
|
service_config=$i
|
||||||
break
|
break
|
||||||
}
|
}
|
||||||
done
|
done
|
||||||
|
|
Loading…
Reference in New Issue
Block a user