You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 

55 lines
1.5 KiB

#!@l_prefix@/bin/openpkg rc
##
## rc.wso2ei -- Run-Commands
##
%config
wso2ei_enable="$openpkg_rc_def"
%common
wso2ei_homedir="@l_prefix@/libexec/wso2ei"
wso2ei_pidfile="@l_prefix@/libexec/wso2ei/wso2carbon.pid"
wso2ei_signal () {
[ -f $wso2ei_pidfile ] && kill -$1 `cat $wso2ei_pidfile`
}
wso2ei_start () {
eval `JAVA_PLATFORM="sun-jdk" @l_prefix@/bin/java-toolkit -e`
export CARBON_HOME="$wso2ei_homedir"
( nohup $wso2ei_homedir/bin/wso2server.sh start \
</dev/null >/dev/null 2>&1 &
) >/dev/null 2>&1
}
wso2ei_stop () {
eval `JAVA_PLATFORM="sun-jdk" @l_prefix@/bin/java-toolkit -e`
export CARBON_HOME="$wso2ei_homedir"
$wso2ei_homedir/bin/wso2server.sh stop
sleep 2
wso2ei_signal TERM
sleep 2
rm -f $wso2ei_pidfile >/dev/null 2>&1 || true
}
%status -u @l_rusr@ -o
wso2ei_usable="unknown"
wso2ei_active="no"
rcService wso2ei enable yes && \
wso2ei_signal 0 && wso2ei_active="yes"
echo "wso2ei_enable=\"$wso2ei_enable\""
echo "wso2ei_usable=\"$wso2ei_usable\""
echo "wso2ei_active=\"$wso2ei_active\""
%start -u @l_rusr@
rcService wso2ei enable yes || exit 0
rcService wso2ei active yes && exit 0
wso2ei_start
%stop -u @l_rusr@
rcService wso2ei enable yes || exit 0
rcService wso2ei active no && exit 0
wso2ei_stop
%restart -u @l_rusr@
rcService wso2ei enable yes || exit 0
rcService wso2ei active no && exit 0
rc wso2ei stop start