Last active
December 16, 2020 13:11
-
-
Save hey-jude/bcd5769954144304861d46ddd5c214ac to your computer and use it in GitHub Desktop.
redis / keydb 프로세스 검사후 재시작 스크립트 : init.d / systemd를 쓸 수 없는 환경에서 crontab으로 대응하기 위해.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
pid=$(/usr/sbin/pidof keydb-server) | |
if [ -z "$pid" ] | |
then | |
#echo "\`pidof keydb-server\` is empty" | |
sleep 5 | |
/bin/rm /log/puser/keydb/keydb_6379.pid | |
$HOME/keydb/etc/init.d/keydb-server start | |
#else | |
# echo "\`pidof keydb-server\` is $pid" | |
fi |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment