git://git.onelab.eu
/
mom.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
- fix how pl_conf is checked and restarted
[mom.git]
/
pl_mop.sh
diff --git
a/pl_mop.sh
b/pl_mop.sh
index
d80ce64
..
6fabb73
100755
(executable)
--- a/
pl_mop.sh
+++ b/
pl_mop.sh
@@
-5,7
+5,7
@@
# Mark Huang <mlhuang@cs.princeton.edu>
# Copyright (C) 2005 The Trustees of Princeton University
#
# Mark Huang <mlhuang@cs.princeton.edu>
# Copyright (C) 2005 The Trustees of Princeton University
#
-# $Id$
+# $Id
: pl_mop.sh,v 1.2 2005/11/03 17:23:25 mlhuang Exp
$
#
PATH=/sbin:/usr/sbin:$PATH
#
PATH=/sbin:/usr/sbin:$PATH
@@
-46,7
+46,7
@@
fix_etc_shadow() {
# keep essential services running
restart_services() {
# keep essential services running
restart_services() {
- for service in autofs sshd pl_sshd pl_mom pl_nm p
l_conf p
roper ; do
+ for service in autofs sshd pl_sshd pl_mom pl_nm proper ; do
echo "* Checking $service"
status=$(service $service status)
if [ $? -ne 0 ] || echo $status 2>&1 | grep -q stopped ; then
echo "* Checking $service"
status=$(service $service status)
if [ $? -ne 0 ] || echo $status 2>&1 | grep -q stopped ; then
@@
-68,6
+68,16
@@
restart_netflow() {
fi
}
fi
}
+# keep pl_conf running
+restart_pl_conf() {
+ echo "* Checking pl_conf"
+ vserver pl_conf exec /sbin/service pl_conf status >/dev/null 2>&1
+ if [ $? -ne 0 ] ; then
+ echo "* Restarting pl_conf"
+ vserver pl_conf restart
+ fi
+}
+
# kill all the processes running in slice contexts
vkillall() {
vps -A | awk '(int($2) > 1) { system("vkill -c " $2 " -s 9 " $1); }'
# kill all the processes running in slice contexts
vkillall() {
vps -A | awk '(int($2) > 1) { system("vkill -c " $2 " -s 9 " $1); }'
@@
-168,6
+178,8
@@
run fix_etc_shadow
run restart_services
run restart_services
+run restart_pl_conf
+
run restart_netflow
run kill_duplicate_ssh
run restart_netflow
run kill_duplicate_ssh