diff options
author | Magnus Feuer <mfeuer@jaguarlandrover.com> | 2016-02-25 11:04:46 -0800 |
---|---|---|
committer | Magnus Feuer <mfeuer@jaguarlandrover.com> | 2016-02-25 11:04:46 -0800 |
commit | 255089dfcf1fab461eed368c7efdbab21cd65da4 (patch) | |
tree | 17f2651eea84f6b6195dc474de14eb7f8d371458 /raspbian_template/rvi.init | |
parent | bc8288c01f7a8355bd63b4f1114424df09929f7c (diff) | |
parent | 2f7d12a5b7843228052e9b9ed3919733652a5f89 (diff) | |
download | rvi_core-255089dfcf1fab461eed368c7efdbab21cd65da4.tar.gz |
Merged from PDXostc/rvi_core develop
Diffstat (limited to 'raspbian_template/rvi.init')
-rwxr-xr-x | raspbian_template/rvi.init | 70 |
1 files changed, 70 insertions, 0 deletions
diff --git a/raspbian_template/rvi.init b/raspbian_template/rvi.init new file mode 100755 index 0000000..9cd4e59 --- /dev/null +++ b/raspbian_template/rvi.init @@ -0,0 +1,70 @@ +#!/bin/sh +# +# Copyright (C) 2014, Jaguar Land Rover +# +# This program is licensed under the terms and conditions of the +# Mozilla Public License, version 2.0. The full text of the +# Mozilla Public License is at https://www.mozilla.org/MPL/2.0/ +# +# +# Init.d script to start and stop an RVI system installed +# through an RPM. +# +### BEGIN INIT INFO +# Provides: rvi +# Required-Start: $network $syslog $remote_fs +# Required-Stop: $network $syslog $remote_fs +# Default-Start: 2 3 4 5 +# Default-Stop: 0 1 6 +# Short-Description: Start/Stop RVI node at boot time +# Description: Manage Remote Vehicle Interaction Node run state. +### END INIT INFO + +export PATH="/bin/:/usr/bin:/sbin:/usr/sbin" +export HOME=/usr/lib/rvi_core +. /lib/lsb/init-functions + +set -e + +case "$1" in + start) + log_daemon_msg "Starting Remote Vehicle Interaction Node..." "rvi" + if /usr/bin/rvi_ctl -c /etc/rvi/rvi.config start; then + log_end_msg 0 + else + log_end_msg 1 + fi + ;; + stop) + log_daemon_msg "Stopping Remote Vehicle Interaction Node..." "rvi" + if /usr/bin/rvi_ctl stop; then + log_end_msg 0 + else + log_end_msg 1 + fi + ;; + + restart) + log_daemon_msg "Restarting Remote Vehicle Interaction Node..." "rvi" + if /usr/bin/rvi_ctl restart; then + log_end_msg 0 + else + log_end_msg 1 + fi + ;; + + force-reload) + log_daemon_msg "Restarting Remote Vehicle Interaction Node..." "rvi" + if /usr/bin/rvi_ctl restart; then + log_end_msg 0 + else + log_end_msg 1 + fi + ;; + *) + log_action_msg "Usage: /etc/init.d/rvi {start|stop|restart}" + exit 1 +esac + +exit 0 + |