-
Notifications
You must be signed in to change notification settings - Fork 0
/
t2i
executable file
·36 lines (31 loc) · 898 Bytes
/
t2i
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
#! /bin/sh
# /etc/init.d/noip
### BEGIN INIT INFO
# Provides: noip
# Required-Start: $remote_fs $syslog
# Required-Stop: $remote_fs $syslog
# Default-Start: 2 3 4 5
# Default-Stop: 0 1 6
# Short-Description: Simple script to start a program at boot
# Description: A simple script from www.stuffaboutcode.com which will start / stop a program a boot / shutdown.
### END INIT INFO
# If you want a command to always run, put it here
# Carry out specific functions when asked to by the system
case "$1" in
start)
echo "Starting t2i"
# run application you want to start
# exec node /home/pi/tele2ice_ok/t2i.js
/usr/local/bin/node /home/pi/Telegram2Icecast/t2i.js &
;;
stop)
echo "Stopping t2i"
# kill application you want to stop
killall t2i
;;
*)
echo "Usage: /etc/init.d/t2i {start|stop}"
exit 1
;;
esac
exit 0