1 |
#!/bin/sh |
#!/bin/sh |
2 |
|
|
3 |
|
need_remount=0 |
4 |
|
|
5 |
if [ -x @@SBINDIR@@/sslsvd -a -x @@SBINDIR@@/mcored -a -f @@CONFDDIR@@/mcored ] |
if [ -x @@SBINDIR@@/sslsvd -a -x @@SBINDIR@@/mcored -a -f @@CONFDDIR@@/mcored ] |
6 |
then |
then |
7 |
if getargbool 1 rd.mcored && getargbool 0 rd.neednet && NEEDNET=1 |
if getargbool 1 rd.mcored && getargbool 0 rd.neednet && NEEDNET=1 |
8 |
then |
then |
9 |
# print ip config |
# print ip config |
10 |
info "Current ip settings:" |
echo "Current ip settings:" |
11 |
info "$(ip addr)" |
echo "$(ip addr)" |
12 |
# remont /sysroot writeable |
[ -w / ] || need_remount=1 |
13 |
info "Remount /sysroot writeable" |
if [[ ${need_remount} = 1 ]] |
14 |
mount -oremount,rw /sysroot |
then |
15 |
|
# remont /sysroot writeable |
16 |
|
echo "Remount /sysroot writeable" |
17 |
|
mount -oremount,rw /sysroot |
18 |
|
fi |
19 |
# start mcored |
# start mcored |
20 |
echo "Starting mcore daemon" |
echo "Starting mcore daemon" |
|
info "Starting mcore daemon" |
|
21 |
export MROOT=/sysroot |
export MROOT=/sysroot |
22 |
. @@CONFDDIR@@/mcored |
. @@CONFDDIR@@/mcored |
23 |
@@SBINDIR@@/sslsvd -U ${SSL_USER} -/ ${CHROOT_DIR} \ |
@@SBINDIR@@/sslsvd -U ${SSL_USER} -/ ${CHROOT_DIR} \ |
24 |
-Z ${SSL_CERT} -K ${SSL_KEY} \ |
-Z ${SSL_CERT} -K ${SSL_KEY} \ |
25 |
0 6666 @@SBINDIR@@/mcored |
0 6666 @@SBINDIR@@/mcored |
26 |
# remount sysroot read-only |
if [[ ${need_remount} = 1 ]] |
27 |
info "Remount /sysroot read-only" |
then |
28 |
mount -oremount,ro /sysroot |
# remount sysroot read-only |
29 |
|
echo "Remount /sysroot read-only" |
30 |
|
mount -oremount,ro /sysroot |
31 |
|
fi |
32 |
fi |
fi |
33 |
fi |
fi |