⚝
One Hat Cyber Team
⚝
Your IP:
216.73.216.19
Server IP:
178.33.27.10
Server:
Linux cpanel.dev-unit.com 3.10.0-1160.108.1.el7.x86_64 #1 SMP Thu Jan 25 16:17:31 UTC 2024 x86_64
Server Software:
Apache/2.4.57 (Unix) OpenSSL/1.0.2k-fips
PHP Version:
8.2.11
Buat File
|
Buat Folder
Eksekusi
Dir :
~
/
proc
/
self
/
root
/
usr
/
local
/
src
/
redis-6.1.0
/
tests
/
View File Name :
mkring.sh
#!/bin/bash PORTS="6379 6380 6381 6382" REDIS=redis-server function start_node() { P=$1 echo "starting node on port $P"; CONFIG_FILE=`tempfile` cat > $CONFIG_FILE << CONFIG port $P CONFIG $REDIS $CONFIG_FILE > /dev/null 2>/dev/null & sleep 1 rm -f $CONFIG_FILE } function stop_node() { P=$1 PID=$2 redis-cli -h localhost -p $P shutdown kill -9 $PID 2>/dev/null } function stop() { for P in $PORTS; do PID=`lsof -i :$P | tail -1 | cut -f 2 -d " "` if [ "$PID" != "" ]; then stop_node $P $PID fi done } function start() { for P in $PORTS; do start_node $P done } case "$1" in start) start ;; stop) stop ;; restart) stop start ;; *) echo "Usage: $0 [start|stop|restart]" ;; esac