source: ipk/source.arm/networklib_e2webserv/CONTROL/postinst

Last change on this file was 44421, checked in by gost, 17 months ago

fix e2webserv

File size: 679 bytes
Line 
1#!/bin/sh
2INSTDIR="$1"
3
4if [ -f /mnt/config/usercmd.sh ]; then
5        sed -i "/^exit/i$INSTDIR/bin/e2webserv -b -c $INSTDIR/etc/e2webserv.conf" /mnt/config/usercmd.sh
6else
7  echo "$INSTDIR/bin/e2webserv -b -c $INSTDIR/etc/e2webserv.conf" > /mnt/config/usercmd.sh
8  chmod 755 /mnt/config/usercmd.sh
9fi
10
11if [ ! -e $INSTDIR/etc/e2webserv.conf ]; then
12        echo "use TPK config file"
13        mv $INSTDIR/etc/e2webserv.conf.e2 $INSTDIR/etc/e2webserv.conf
14        chmod -x $INSTDIR/etc/e2webserv.conf
15else
16        echo "found user config file"
17        echo "skip TPK config file: e2webserv.conf.e2"
18fi
19
20echo "start e2webserv..."
21$INSTDIR/bin/e2webserv -b -c $INSTDIR/etc/e2webserv.conf > /dev/null 2>&1
22echo "done."
23
24exit 0
Note: See TracBrowser for help on using the repository browser.