change namespacing from :: to service::

Signed-off-by: fbt <fbt@fleshless.org>
This commit is contained in:
Jack L. Frost 2018-03-06 19:42:31 +03:00
parent da1ffe1a7b
commit dfd942ca49

9
ssm
View File

@ -124,7 +124,7 @@ die() {
}; readonly -f die
if_service_action() {
for f in "$1" "$service_name::$1"; do
for f in "service::$1" "$1"; do
is_function "$f" && return 0
done
@ -132,7 +132,7 @@ if_service_action() {
}; readonly -f if_service_action
run_service_action() {
for f in "$service_name::$1" "$1"; do
for f in "service::$1" "$1"; do
is_function "$f" && {
"$f"; return $?
}
@ -767,11 +767,6 @@ flag_edit_service && { edit; die $?; }
service_name = "${1##*/}"
readonly service_name
# Enforce service_name to conform to BASH's name constraints
[[ $service_name =~ ^[a-zA-Z_][a-zA-Z0-9_]+?$ ]] || {
die 77 "Invalid service name: '$service_name'"
}
# These depend on the service_name and make little sense to reconfigure.
service_ready_flag := "$rundir/$service_name.ready"
service_enabled_flag := "$rundir/$service_name.enabled"