Title: [opsview] [11721] Merge from commercial: Check perms on /var/run/opsview
- Revision
- 11721
- Author
- hudson
- Date
- 2013-03-11 15:32:50 +0000 (Mon, 11 Mar 2013)
Log Message
Merge from commercial: Check perms on /var/run/opsview
Modified Paths
Modified: trunk/opsview-web/bin/opsview-web
===================================================================
--- trunk/opsview-web/bin/opsview-web 2013-03-11 14:59:03 UTC (rev 11720)
+++ trunk/opsview-web/bin/opsview-web 2013-03-11 15:32:50 UTC (rev 11721)
@@ -59,11 +59,20 @@
die() { echo $1; exit 1; }
-if [ ! -d /var/run/opsview ]; then
- echo "/var/run/opsview is missing; please re-run this script as root"
+if [ ! -d $piddir ]; then
+ echo "$piddir is missing; please re-run this script as root"
exit 1
fi
+# don't test against $pidfile as tidying up may break a correctly running system
+touch $piddir/permissions_check 2>/dev/null
+if [ ! -f $piddir/permissions_check ]; then
+ echo "$piddir has the wrong permissions; please re-run this script as root"
+ exit 1
+else
+ rm $piddir/permissions_check
+fi
+
start() {
OPSVIEW_WEB_PRODUCTION_SERVER=1
export OPSVIEW_WEB_PRODUCTION_SERVER
_______________________________________________
Opsview-checkins mailing list
Opsview-checkins@lists.opsview.org
http://lists.opsview.org/lists/listinfo/opsview-checkins