Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

完成 RQ 合并, 完善启动脚本

  • Loading branch information...
commit b14800d528a1efa5d4bda25e4a69b77ebfec35d4 1 parent e2cabf1
@fanzeyi authored
Showing with 10 additions and 1 deletion.
  1. +10 −1 daemons-rq/run.sh
View
11 daemons-rq/run.sh
@@ -2,8 +2,17 @@
# AUTHOR: Zeray Rice <fanzeyi1994@gmail.com>
# FILE: run.sh
# CREATED: 02:25:51 09/06/2012
-# MODIFIED: 02:31:16 09/06/2012
+# MODIFIED: 18:17:17 09/06/2012
+if [ "$(id -u)" != "0" ]; then
+ echo "This script must be run as root" 1>&2
+ exit 1
+fi
+
+if [ "$(ps -A | grep redis-server | wc -l)" == "0" ]; then
+ echo "Redis Server is not running!" 1>&2
+ exit 1
+fi
rqworker judge 2>&1 >> judge.log &
python2 daemons.py 2>&1 >> daemons.log &
Please sign in to comment.
Something went wrong with that request. Please try again.