corrected permissions and path-settings in *d.ini-files.

This commit is contained in:
Micha Glave
2011-07-19 13:31:40 +02:00
parent 4f5218cb2a
commit 66e2feddc1
4 changed files with 32 additions and 35 deletions

View File

@@ -1,5 +1,5 @@
--- setup.py.orig 2011-06-23 10:21:23.000000000 +0200
+++ setup.py 2011-07-05 23:23:26.000000000 +0200
--- /root/setup.py.org 2011-07-19 13:18:36.274866779 +0200
+++ shinken-0.6.5/setup.py 2011-07-19 13:26:14.922605481 +0200
@@ -174,9 +174,9 @@
buf = f.read()
f.close
@@ -13,7 +13,7 @@
# write out the new file
f = open(outfile, "w")
f.write(buf)
@@ -192,21 +192,21 @@
@@ -192,21 +192,19 @@
for name in daemon_ini_files:
inname = os.path.join('etc', name)
outname = os.path.join(self.build_dir, name)
@@ -30,15 +30,15 @@
# but we have to force the user/group & workdir values still:
append_file_with(inname, outname, """
user=%s
group=%s
-user=%s
-group=%s
workdir=%s
-""" % ( self.owner, self.group, self.var_path, ))
+""" % ( self.owner, self.group, "/var/lib/shinken", ))
+""" % ( "/var/lib/shinken", ))
# And now the resource.cfg path with the value of libexec path
# Replace the libexec path by the one in the parameter file
@@ -216,7 +216,7 @@
@@ -216,7 +214,7 @@
log.info('updating path in %s', outname)
update_file_with_string(inname, outname,
"/usr/local/shinken/libexec",
@@ -47,7 +47,7 @@
# And update the nagios.cfg file for all /usr/local/shinken/var
# value with good one
@@ -230,7 +230,7 @@
@@ -230,7 +228,7 @@
## nagios.cfg & shinken-specific use now relative paths (relative to the "VAR" one)
update_file_with_string(inname, outname,
"/usr/local/shinken/var",
@@ -56,7 +56,7 @@
## but we HAVE to set the shinken_user & shinken_group to thoses requested :
append_file_with(inname, outname, """
@@ -416,7 +416,7 @@
@@ -416,7 +414,7 @@
},
name = "Shinken",
@@ -65,7 +65,7 @@
packages = find_packages(),
package_data = {'':['*.py','modules/*.py','modules/*/*.py']},
description = "Shinken is a monitoring tool compatible with Nagios configuration and plugins",
@@ -484,29 +484,6 @@
@@ -484,29 +482,6 @@
glob('etc/certs/[!_]*.pem')
),
@@ -95,4 +95,3 @@
(
default_paths['libexec'], ['libexec/check.sh']
),

View File

@@ -5,8 +5,6 @@
MODULE=${SVCNAME#*.}
_MODULE=$(echo $MODULE | awk '{print toupper($0)}')
SHINKEN=/usr/bin/shinken
PIDPATH=/var/run/shinken
PIDFILE=${PIDPATH}/${MODULE}
LANG=en_US.UTF8
@@ -18,14 +16,10 @@ SHINKENM="/usr/bin/shinken-${MODULE}"
if [ $MODULE = "arbiter" ]; then
CONFIGFILE="${SHINKENCFG} --config ${SHINKENSPECIFICCFG}"
fi
NEED="net"
PIDFILE=$(grep '^pidfile=' ${CONFIGFILE} | awk -F= '{ print $2 }')
depend() {
if [ $SVCNAME = "shinken" ]; then
NEED="$NEED shinken.arbiter shinken.broker shinken.scheduler"
ebegin "show $NEED"
fi
need $NEED
need net
}
start() {
@@ -34,7 +28,7 @@ start() {
return 0
fi
ebegin "starting shinken ${MODULE}"
start-stop-daemon --start --exec ${SHINKENM} --pidfile "${PIDFILE}" \
start-stop-daemon --start --exec ${SHINKENM} --pidfile ${PIDFILE} \
-- --config ${CONFIGFILE} --daemon
eend $?
}