blob: 9cd4e5934c1e9d9345a6db6ea9e2ed92706d1e42 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
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
|