-
Notifications
You must be signed in to change notification settings - Fork 1
/
startbcm
45 lines (45 loc) · 891 Bytes
/
startbcm
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
#!/bin/sh
#
# Startup script for BayCom-Mailbox
#
# put the following entry into /etc/inittab and start with "kill -HUP 1"
# "bc:45:respawn:/bcm/startbcm"
#
sleep 20
BCMHOME=/bcm
export BCMHOME
# export TZ=GMT+0GMT
cd $BCMHOME
PATH=/bin:/usr/bin:/usr/local/bin:/bcm:/bcm/runutils
export PATH
alias ll='ls -l'
alias dir='ls -la'
# alias -='cd ..'
# alias m='cat'
#
# remove comment if necessary!
# source .bash_profile
#
# check if somebody wants to install a new version
if [ -f bcm_new ]
then
mv -f bcm bcm_old
mv -f bcm_new bcm
chmod 777 bcm
fi
#
# start bcm as user "bcm"
# redirect tracer outputs to system console
#
if [ -f nobcm ]
then
echo "BCM execution stopped. Remove nobcm for continue."
sleep 20
else
su root -s $BCMHOME/bcm >/dev/tty8
# su bcm -s $BCMHOME/bcm >/dev/console
fi
#
# wait some time to release network bindings before respawning
#
sleep 20