Build binary only when missing

Signed-off-by: Sean Du <do4suki@gmail.com>
This commit is contained in:
2026-06-03 01:41:10 +08:00
parent 8d82d60ece
commit f255b25a2e
2 changed files with 10 additions and 2 deletions
+9 -1
View File
@@ -35,7 +35,15 @@ start_app() {
return 0
fi
build_app
if [[ ! -f "$APP_BIN" ]]; then
build_app
fi
if [[ ! -x "$APP_BIN" ]]; then
echo "honoka-chan binary is not executable: $APP_BIN"
exit 1
fi
nohup "$APP_BIN" >>"$LOG_FILE" 2>&1 &
local pid=$!
echo "$pid" >"$PID_FILE"