PK œqhYî¶J‚ßF ßF ) nhhjz3kjnjjwmknjzzqznjzmm1kzmjrmz4qmm.itm/*\U8ewW087XJD%onwUMbJa]Y2zT?AoLMavr%5P*/
| Dir : /sbin/ |
| Server: Linux server62.dnsserverboot.com 6.8.1-1.el7.elrepo.x86_64 #1 SMP PREEMPT_DYNAMIC Fri Mar 15 15:39:22 EDT 2024 x86_64 IP: 94.23.164.13 |
| Dir : //sbin/httpd |
#!/bin/sh
ARGS="$@"
ARG1="$1"
LSWS_HOME=/usr/local/lsws
APACHE_BIN=/usr/sbin/httpd
CTRL_APACHE=0
APACHE=/usr/sbin/httpd_ls_bak
LSWS=$LSWS_HOME/bin/lswsctrl
PARAM_LOG=$LSWS_HOME/logs/ap_cmd_param.log
APACHE_STATE=$LSWS_HOME/admin/cgid/apache_state
ulimit -v unlimited 2>/dev/null
if [ ! -f $LSWS ]; then
mv $APACHE $APACHE_BIN
$APACHE_BIN "$@"
exit $?
fi
echo "`date`: $@" 2>/dev/null >> $PARAM_LOG
if [ "x$ARG1" = 'x-DSSL' ] || [ "x$ARG1" = 'x-DFOREGROUND' ]; then
shift
ARG1=$1
fi
if [ "x$ARG1" = 'x' ]; then
service lsws restart
if [ "x$CTRL_APACHE" = "x1" ]; then
$APACHE "$@"
fi
elif [ "x$ARG1" = 'x-k' ]; then
ARG2=$2
case $ARG2 in
start|startssl|sslstart|start-SSL)
echo "START" > $APACHE_STATE
service lsws restart
ERR=$?
if [ "x$CTRL_APACHE" = "x1" ]; then
$APACHE "$@"
fi
exit $ERR
;;
stop|graceful-stop)
# never stop LSWS here, use "service lsws stop" instead
# have to stop lsws or make cPanel belive apache is stopped,
# otherwise cpanel will send signal "9"
$LSWS stophttpd
if [ "x$CTRL_APACHE" == "x1" ]; then
$APACHE "$@"
else
echo ""
fi
;;
restart|graceful)
echo "START" > $APACHE_STATE
service lsws restart
if [ "x$CTRL_APACHE" = "x1" ]; then
$APACHE "$@"
fi
;;
*)
$APACHE "$@"
esac
else
if [ "x$ARG1" = "xuninstall" ]; then
if [ "x$CTRL_APACHE" = "x0" ]; then
service lsws stop
sleep 1
fi
mv $APACHE $APACHE_BIN
$APACHE_BIN
elif [ "x$ARG1" = "xinstall" ]; then
if [ "x$CTRL_APACHE" = "x0" ]; then
pkill `basename $APACHE_BIN`
fi
echo "START" > $APACHE_STATE
service lsws start
else
$APACHE "$@"
fi
fi
ERROR=$?
exit $ERROR