403Webshell
Server IP : 118.27.122.248  /  Your IP : 216.73.217.142
Web Server : Apache
System : Linux web0264.sh.tyo1 4.18.0-553.79.1.lve.el7h.x86_64 #1 SMP Wed Oct 15 16:34:46 UTC 2025 x86_64
User : c9415830 ( 11735)
PHP Version : 8.4.17
Disable Function : NONE
MySQL : OFF  |  cURL : ON  |  WGET : ON  |  Perl : ON  |  Python : ON  |  Sudo : OFF  |  Pkexec : OFF
Directory :  /opt/jp-secure/siteguardlite/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : /opt/jp-secure/siteguardlite/siteguardlite_notify.command.bak
#!/bin/sh
#
#  rc.siteguardlite_notify
#   - initscript for SiteGuard lite
#
# chkconfig: - 99 01
# description: SiteGuard lite
#
### BEGIN INIT INFO
# Provides:                     siteguardlite_notify
# Required-Start:               $local_fs $remote_fs $network
# Required-Stop:                $local_fs $remote_fs $network
# Default-Start:                2 3 4 5
# Default-Stop:                 0 1 6
# Short-Description:            SiteGuard lite
# Description:                  Start the SiteGuard lite
### END INIT INFO
#
# Source function library.

# Path to the siteguard lite package.
prefix=/opt/jp-secure/siteguardlite
suffix=
PRODUCT=siteguardlite
svc=notify

if [ -r /etc/rc.d/init.d/functions ] ; then
	. /etc/rc.d/init.d/functions
fi

export PATH=${prefix}/localbin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:.
export LD_LIBRARY_PATH=/usr/local/lib:/usr/lib:/lib:.
export LD_BIND_NOW=1
unset MAKELEVEL
unset MAKEFLAGS


RETVAL=0
cd $prefix

localprog=${prefix}/rc.${PRODUCT}_${svc}.local

if [ -x ${localprog} -a "X`basename $0`" != "Xrc.${PRODUCT}_${svc}.local" ]; then
	exec ${localprog} $*
fi

prog=${PRODUCT}${suffix}_${svc}
progfull=${prog}
pidfile=pid.${prog}
progdesc="Notify Service"

start() {
	echo -n "Starting $progdesc: "
	RETVAL=0
	if [ -f ${pidfile} ];then
		pid=`cat ${pidfile}`
		pidprog=`cat /proc/${pid}/cmdline | perl -pe 's/\0.*//'`
		if [ "${pidprog}" = "${progfull}" ]; then
			echo "$progdesc is already running. (file:${progfull}, pid:${pid})"
			RETVAL=1
		else
			if ! rm -f ${pidfile} ; then
				echo "Cannot remove pidfile(${pidfile})."
				RETVAL=1
			fi
		fi
	fi
	ulimit -c unlimited
	ulimit -t unlimited
	if [ $RETVAL = 0 ]; then
		${progfull} --pidfile=${pidfile} >/dev/null 2>&1
		RETVAL=$?
	fi
	if [ $RETVAL = 0 ]; then
		if type success >/dev/null 2>&1 ; then
			success "$progdesc startup"
		else
			echo -n " [ OK ]"
		fi
	else
		if type failure >/dev/null 2>&1 ; then
			failure "$progdesc startup"
		else
			echo -n " [ FAILED ]"
		fi
	fi
	echo
	if [ -d /var/lock/subsys -a  "X$UID" = "X0" ]; then touch /var/lock/subsys/${prog} ; fi
	return $RETVAL
}
stop() {
	RETVAL=0
	echo -n "Stopping $progdesc: "
	pid=`cat ${pidfile} 2>/dev/null`
	if [ -z "${pid}" ]; then
		echo "$progdesc is not running."
		RETVAL=1	
	fi
	flag_echo_result=1

	if [ $RETVAL = 0 ];then
		kill ${pid}
		RETVAL=$?
	fi
	if [ -f "${pidfile}" ]; then rm -f ${pidfile}; fi
	if [ $flag_echo_result = 1 ]; then
		if [ $RETVAL = 0 ]; then
			if type success >/dev/null 2>&1 ; then
				success "$progdesc shutdown"
			else
				echo -n " [ OK ]"
			fi
		else
			if type failure >/dev/null 2>&1 ; then
				failure "$progdesc shutdown"
			else
				echo -n " [ FAILED ]"
			fi
		fi
	fi
	echo
	if [ -f /var/lock/subsys/${prog} -a "X$UID" = "X0" ]; then rm -f /var/lock/subsys/${prog} ; fi
	return $RETVAL
}

status(){
	if [ -e ${pidfile} ]; then
		pid=`cat ${pidfile} 2>/dev/null`
		if [ -n "${pid}"  ] ; then
			echo "$progdesc (pid ${pid}) is running"
			RETVAL=0
		else
			echo "$progdesc is stopped"
			RETVAL=3
		fi
	else
		echo "$progdesc is stopped"
		RETVAL=3
	fi
	return $RETVAL
}

reload(){
	status
	if [ $? -ne 0 ]; then
		start
	else
		pid=`cat ${pidfile}`
		echo "Reloading $progdesc: "
		kill -HUP ${pid}
	fi
}

# See how we were called.
case "$1" in
  start)
	start
	;;
  stop)
	stop
	;;
  status)
	status
	;;
  restart)
	stop
	sleep 5
	start
	;;
  reload)
	reload
	;;
  *)
	echo $"Usage: $0 {start|stop|restart|status|reload}"
	exit 1
esac

exit $RETVAL



Youez - 2016 - github.com/yon3zu
LinuXploit