mirror of
https://github.com/caiwx86/small-packages.git
synced 2026-11-01 04:23:56 +08:00
update 2026-05-27 19:55:46
This commit is contained in:
1 parent
762a95b5ae
commit
84f707b52b
758 files changed
-362299
No files matched your search
@@ -1,46 +0,0 @@
|
||||
#!/bin/sh /etc/rc.common
|
||||
|
||||
USE_PROCD=1
|
||||
START=99
|
||||
|
||||
CONF="gost"
|
||||
PROG="/usr/bin/gost"
|
||||
|
||||
start_service() {
|
||||
local enabled
|
||||
|
||||
config_load "gost"
|
||||
config_get_bool enabled "config" "enabled" 0
|
||||
[ "$enabled" -eq 1 ] || return 1
|
||||
|
||||
local config_file arguments
|
||||
config_get config_file "config" "config_file"
|
||||
config_get arguments "config" "arguments"
|
||||
|
||||
procd_open_instance
|
||||
|
||||
procd_set_param command "$PROG"
|
||||
if [ -n "$config_file" ]; then
|
||||
procd_append_param command -C "$config_file"
|
||||
procd_set_param file "$config_file"
|
||||
fi
|
||||
if [ -n "$arguments" ]; then
|
||||
set -- $arguments
|
||||
procd_append_param command "$@"
|
||||
fi
|
||||
|
||||
procd_set_param user gost
|
||||
procd_set_param group gost
|
||||
|
||||
procd_set_param limits core="unlimited"
|
||||
procd_set_param limits nofile="1000000 1000000"
|
||||
procd_set_param stderr 1
|
||||
|
||||
procd_set_param respawn
|
||||
|
||||
procd_close_instance
|
||||
}
|
||||
|
||||
service_triggers() {
|
||||
procd_add_reload_trigger "$CONF"
|
||||
}
|
||||
Reference in new issue
Block a user