diff options
author | ToshikazuOhiwa <toshikazu_ohiwa@mail.toyota.co.jp> | 2020-03-30 09:24:26 +0900 |
---|---|---|
committer | ToshikazuOhiwa <toshikazu_ohiwa@mail.toyota.co.jp> | 2020-03-30 09:24:26 +0900 |
commit | 5b80bfd7bffd4c20d80b7c70a7130529e9a755dd (patch) | |
tree | b4bb18dcd1487dbf1ea8127e5671b7bb2eded033 /bsp/meta-boundary/recipes-boundary/app-startup/files/app | |
parent | 706ad73eb02caf8532deaf5d38995bd258725cb8 (diff) |
agl-basesystem
Diffstat (limited to 'bsp/meta-boundary/recipes-boundary/app-startup/files/app')
-rwxr-xr-x | bsp/meta-boundary/recipes-boundary/app-startup/files/app | 46 |
1 files changed, 46 insertions, 0 deletions
diff --git a/bsp/meta-boundary/recipes-boundary/app-startup/files/app b/bsp/meta-boundary/recipes-boundary/app-startup/files/app new file mode 100755 index 00000000..32f7ae4a --- /dev/null +++ b/bsp/meta-boundary/recipes-boundary/app-startup/files/app @@ -0,0 +1,46 @@ +#!/bin/sh +### BEGIN INIT INFO +# Provides: app +# Required-Start: wifi +# Required-Stop: wifi +# Default-Start: S +# Default-Stop: +# +# install with update-rc.d app start 80 5 . +# +# SPDX-License-Identifier: LGPL-3.0+ +# +### END INIT INFO + +case "$1" in + start) + echo -n "Starting application" + daemonize /app/run-app + echo "done" + ;; + stop) + echo -n "Stopping application" + /app/stop-app + echo "done" + ;; + restart) + $0 stop + $0 start + ;; + status) + pid=`pidof -x run-app` + if [ -n "$pid" ]; then + echo "run-app (pid $pid) is running ..." + exit 2 + else + echo "run-app is stopped" + fi + ;; + *) + echo "Usage: app { start | stop | restart | status }" >&2 + exit 1 + ;; +esac + +exit 0 + |