-
Notifications
You must be signed in to change notification settings - Fork 8
/
Copy pathinstall
executable file
·65 lines (49 loc) · 1.25 KB
/
install
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
#!/bin/sh
PROG="live"
PROG_PATH="/data/app/$PROG"
MSG_PREFIX=" *"
echo "$MSG_PREFIX start install $PROG"
make -j4
if [ -d "$PROG_PATH" ] ; then
rm -rf $PROG_PATH
fi
mkdir -p $PROG_PATH
cp -v -n ./vlrtmp $PROG_PATH/
cp -v -n ./vlrtmp.sh $PROG_PATH/
cp -v -n ./vlsave $PROG_PATH/
cp -v -n ./vlserver $PROG_PATH/
cp -v -n ./vlserver.sh $PROG_PATH/
if [ -f "/usr/bin/vlrtmp" ] ;then
echo "$MSG_PREFIX not need add to /usr/bin"
else
ln -f -s $PROG_PATH/vlrtmp /usr/bin/vlrtmp
fi
if [ -f "/usr/bin/vlsave" ] ;then
echo "$MSG_PREFIX not need add to /usr/bin"
else
ln -f -s $PROG_PATH/vlsave /usr/bin/vlsave
fi
if [ -f "/etc/init.d/vlserver" ] ;then
echo "$MSG_PREFIX not need add to /etc/init.d"
else
ln -f -s $PROG_PATH/vlserver.sh /etc/init.d/vlserver
fi
if [ -f "/etc/init.d/vlrtmp" ] ;then
echo "$MSG_PREFIX not need add to /etc/init.d"
else
ln -f -s $PROG_PATH/vlrtmp.sh /etc/init.d/vlrtmp
fi
if [ -f "/etc/rc0.d/K30vlserver" ] ; then
echo "$MSG_PREFIX not need add vlserver to boot"
else
update-rc.d vlserver defaults 30
fi
if [ -f "/etc/rc0.d/K90vlrtmp" ] ; then
echo "$MSG_PREFIX not need add vlrtmp to boot"
else
update-rc.d vlrtmp defaults 90
fi
echo "$MSG_PREFIX install sucess $PROG"
service vlserver start
sleep 5
service vlrtmp start