mirror of
https://github.com/kiddin9/op-packages.git
synced 2026-11-01 03:55:13 +08:00
🤞 Sync 2026-09-06 22:50:31
This commit is contained in:
1 parent
bb7d626e94
commit
64c17e592d
115 files changed
+8599
-1391
No files matched your search
@@ -10,22 +10,6 @@ get_config() {
|
||||
config_get port "$1" port "9000"
|
||||
}
|
||||
|
||||
load_runtime_env() {
|
||||
local conf_dir
|
||||
|
||||
[ -n "$data_dir" ] || return 1
|
||||
conf_dir="$(dirname "$data_dir")"
|
||||
export ISTORE_RUNTIME_CONF_DIR="$conf_dir"
|
||||
|
||||
if [ -r /lib/functions/istore_runtime.sh ]; then
|
||||
. /lib/functions/istore_runtime.sh
|
||||
istore_runtime_export_env
|
||||
return $?
|
||||
fi
|
||||
|
||||
return 1
|
||||
}
|
||||
|
||||
start_service() {
|
||||
config_load agentflow
|
||||
config_foreach get_config agentflow
|
||||
@@ -35,11 +19,16 @@ start_service() {
|
||||
logger -t agentflow "missing executable: /usr/sbin/agentflow"
|
||||
return 1
|
||||
}
|
||||
mkdir -p "$data_dir" "$data_dir/data" || return 1
|
||||
if ! load_runtime_env; then
|
||||
logger -t agentflow "shared runtime home is not configured"
|
||||
[ -r /lib/functions/mise.sh ] || {
|
||||
logger -t agentflow "missing mise environment helper"
|
||||
return 1
|
||||
}
|
||||
. /lib/functions/mise.sh
|
||||
if ! istore_runtime_env; then
|
||||
logger -t agentflow "failed to initialize mise environment"
|
||||
return 1
|
||||
fi
|
||||
mkdir -p "$data_dir" "$data_dir/data" || return 1
|
||||
|
||||
logger -t agentflow "starting AgentFlow on $host:$port"
|
||||
procd_open_instance
|
||||
@@ -49,14 +38,6 @@ start_service() {
|
||||
"AGENT_FLOW_HOST=$host" \
|
||||
"AGENT_FLOW_PORT=$port" \
|
||||
"HOME=$HOME" \
|
||||
"XDG_DATA_HOME=$XDG_DATA_HOME" \
|
||||
"XDG_CACHE_HOME=$XDG_CACHE_HOME" \
|
||||
"XDG_CONFIG_HOME=$XDG_CONFIG_HOME" \
|
||||
"XDG_STATE_HOME=$XDG_STATE_HOME" \
|
||||
"MISE_DATA_DIR=$MISE_DATA_DIR" \
|
||||
"MISE_CACHE_DIR=$MISE_CACHE_DIR" \
|
||||
"MISE_CONFIG_DIR=$MISE_CONFIG_DIR" \
|
||||
"MISE_STATE_DIR=$MISE_STATE_DIR" \
|
||||
"PATH=$PATH"
|
||||
procd_set_param stdout 1
|
||||
procd_set_param stderr 1
|
||||
|
||||
Reference in new issue
Block a user