Modify service start method

The default service start method does not work with the new caddy command. It has to be modified as well as use the specified Caddyfile.
master
basilhendroff 2020-05-21 05:10:14 +08:00 committed by GitHub
parent ea7717d6c6
commit 6f8dc7e49e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 7 additions and 0 deletions

7
caddy
View File

@ -21,6 +21,8 @@
name="caddy"
rcvar="${name}_enable"
start_cmd="${name}_start"
load_rc_config ${name}
: ${caddy_enable:="NO"}
@ -31,4 +33,9 @@ command="${caddy_bin_path}"
required_files="${caddy_config_path}"
caddy_start()
{
$command start --config ${caddy_config_path}
}
run_rc_command "$1"