feat: import Havline fnOS application package
This commit is contained in:
@@ -0,0 +1,29 @@
|
||||
#!/bin/bash
|
||||
set -u
|
||||
|
||||
CONTAINER_NAME="havline"
|
||||
LOG_FILE="${TRIM_TEMP_LOGFILE:-/dev/stderr}"
|
||||
|
||||
log_error() {
|
||||
echo "$1" > "$LOG_FILE"
|
||||
}
|
||||
|
||||
is_running() {
|
||||
docker inspect "$CONTAINER_NAME" 2>/dev/null | grep -q '"Status": "running"'
|
||||
}
|
||||
|
||||
case "${1:-}" in
|
||||
start|stop)
|
||||
exit 0
|
||||
;;
|
||||
status)
|
||||
if is_running; then
|
||||
exit 0
|
||||
fi
|
||||
exit 3
|
||||
;;
|
||||
*)
|
||||
log_error "Unknown command: ${1:-}"
|
||||
exit 1
|
||||
;;
|
||||
esac
|
||||
Reference in New Issue
Block a user