| Server IP : 172.67.179.166 / Your IP : 172.64.215.63 Web Server : nginx/1.20.2 System : Linux 172-104-110-161.ip.linodeusercontent.com 3.10.0-1160.36.2.el7.x86_64 #1 SMP Wed Jul 21 11:57:15 UTC 2021 x86_64 User : www ( 1000) PHP Version : 8.1.9 Disable Function : passthru,exec,system,putenv,chroot,chgrp,chown,shell_exec,popen,proc_open,pcntl_exec,ini_alter,ini_restore,dl,openlog,syslog,readlink,symlink,popepassthru,pcntl_alarm,pcntl_fork,pcntl_waitpid,pcntl_wait,pcntl_wifexited,pcntl_wifstopped,pcntl_wifsignaled,pcntl_wifcontinued,pcntl_wexitstatus,pcntl_wtermsig,pcntl_wstopsig,pcntl_signal,pcntl_signal_dispatch,pcntl_get_last_error,pcntl_strerror,pcntl_sigprocmask,pcntl_sigwaitinfo,pcntl_sigtimedwait,pcntl_exec,pcntl_getpriority,pcntl_setpriority,imap_open,apache_setenv MySQL : OFF | cURL : ON | WGET : ON | Perl : ON | Python : ON | Sudo : ON | Pkexec : ON Directory : /etc/rc0.d/ |
Upload File : |
#! /bin/bash
#
# memcached: MemCached Daemon
#
# chkconfig: - 90 25
# description: MemCached Daemon
#
### BEGIN INIT INFO
# Provides: memcached
# Required-Start: $syslog
# Required-Stop: $syslog
# Should-Start: $local_fs
# Should-Stop: $local_fs
# Default-Start: 2 3 4 5
# Default-Stop: 0 1 6
# Short-Description: memcached - Memory caching daemon
# Description: memcached - Memory caching daemon
### END INIT INFO
IP=127.0.0.1
PORT=11211
USER=memcached
MAXCONN=1024
CACHESIZE=64
OPTIONS=""
RETVAL=0
prog="memcached"
start () {
echo -n $"Starting $prog: "
/usr/local/memcached/bin/memcached -d -l $IP -p $PORT -u $USER -m $CACHESIZE -c $MAXCONN -P /var/run/memcached.pid $OPTIONS
if [ "$?" != 0 ] ; then
echo " failed"
exit 1
else
touch /var/lock/subsys/memcached
echo $(ps -ef |grep /usr/local/memcached/bin/memcached|grep -v grep|awk '{print $2}') > /var/run/memcached.pid
echo " done"
fi
}
stop () {
echo -n $"Stopping $prog: "
if [ ! -e /var/run/$prog.pid ]; then
echo -n $"$prog is not running."
exit 1
fi
kill `cat /var/run/memcached.pid`
if [ "$?" != 0 ] ; then
echo " failed"
exit 1
else
rm -f /var/lock/subsys/memcached
rm -f /var/run/memcached.pid
echo " done"
fi
}
restart () {
$0 stop
sleep 2
$0 start
}
# See how we were called.
case "$1" in
start)
start
;;
stop)
stop
;;
restart|reload)
restart
;;
*)
echo $"Usage: $0 {start|stop|status|restart|reload}"
exit 1
;;
esac
exit $?