diff options
author | Magnus <mfeuer@jaguarlandrover.com> | 2014-09-15 16:16:10 -0700 |
---|---|---|
committer | Magnus <mfeuer@jaguarlandrover.com> | 2014-09-15 16:16:10 -0700 |
commit | 9400fc7b570c12987a27771be4fedf1d9a125682 (patch) | |
tree | c767cf72f11edbcafa3271223cda71c2af410db0 /scripts/rvi | |
parent | f0f53cf69a83980af80c664b304493dd90b0f006 (diff) | |
download | rvi_core-9400fc7b570c12987a27771be4fedf1d9a125682.tar.gz |
Moved script files to its own directory. Added tizen systemd support. Fixed init script support.
Signed-off-by: Magnus <mfeuer@jaguarlandrover.com>
Diffstat (limited to 'scripts/rvi')
-rwxr-xr-x | scripts/rvi | 48 |
1 files changed, 48 insertions, 0 deletions
diff --git a/scripts/rvi b/scripts/rvi new file mode 100755 index 0000000..6074d19 --- /dev/null +++ b/scripts/rvi @@ -0,0 +1,48 @@ +#! /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. +# +export PATH="/bin/:/usr/bin:/sbin:/usr/sbin" +. /lib/lsb/init-functions + +set -e + +case "$1" in + start) + log_daemon_msg "Starting Remote Vehicle Interaction Node..." "rvi" + if /opt/rvi-0.2/bin/rvi start; then + log_end_msg 0 + else + log_end_msg 1 + fi + ;; + stop) + log_daemon_msg "Stopping Remote Vehicle Interaction Node..." "rvi" + if /opt/rvi-0.2/bin/rvi stop; then + log_end_msg 0 + else + log_end_msg 1 + fi + ;; + restart) + log_daemon_msg "Restarting Remote Vehicle Interaction Node..." "rvi" + if /opt/rvi-0.2/bin/rvi restart; then + log_end_msg 0 + else + log_end_msg 1 + fi + ;; + *) + log_action_msg "Usage: /etc/init.d/sdbd {start|stop|restart}" + exit 1 +esac + +exit 0 |