mirror of
https://github.com/kiddin9/op-packages.git
synced 2026-10-29 19:35:13 +08:00
✨ Sync 2026-04-22 04:42:14
This commit is contained in:
1 parent
9637c56cbd
commit
8541cb3d03
17 files changed
+275
-43
No files matched your search
Executable
+27
@@ -0,0 +1,27 @@
|
||||
#!/bin/sh /etc/rc.common
|
||||
|
||||
START=93
|
||||
USE_PROCD=1
|
||||
|
||||
get_config() {
|
||||
config_get enabled $1 enabled "0"
|
||||
config_get port $1 port "8333"
|
||||
}
|
||||
|
||||
start_service() {
|
||||
config_load ghttpd
|
||||
config_foreach get_config ghttpd
|
||||
[ $enabled != 1 ] && return 1
|
||||
procd_open_instance
|
||||
procd_set_param command /usr/sbin/ghttpd openwrt
|
||||
if [ -n "$port" ]; then
|
||||
procd_append_param command --port "$port"
|
||||
fi
|
||||
procd_set_param stderr 1
|
||||
procd_set_param respawn
|
||||
procd_close_instance
|
||||
}
|
||||
|
||||
service_triggers() {
|
||||
procd_add_reload_trigger "ghttpd"
|
||||
}
|
||||
Reference in new issue
Block a user