You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
25 lines
540 B
Bash
25 lines
540 B
Bash
#!/usr/bin/env bash
|
|
set -euo pipefail
|
|
|
|
mkdir -p /opt/1panel/conf /opt/1panel/db /opt/1panel/log /opt/1panel/tmp /opt/1panel/geo
|
|
|
|
if [ ! -f /opt/1panel/conf/app.yaml ]; then
|
|
cp /usr/local/share/1panel/app.yaml /opt/1panel/conf/app.yaml
|
|
fi
|
|
|
|
/usr/local/bin/1panel-agent &
|
|
agent_pid=$!
|
|
|
|
/usr/local/bin/1panel-core &
|
|
core_pid=$!
|
|
|
|
term_handler() {
|
|
kill "${core_pid}" "${agent_pid}" 2>/dev/null || true
|
|
}
|
|
|
|
trap term_handler SIGTERM SIGINT
|
|
|
|
wait "${core_pid}"
|
|
kill "${agent_pid}" 2>/dev/null || true
|
|
wait "${agent_pid}" 2>/dev/null || true
|