service dependencies added.
This commit is contained in:
@@ -1,97 +0,0 @@
|
||||
--- /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
|
||||
# substitute
|
||||
- buf = buf.replace("$ETC$", self.etc_path)
|
||||
- buf = buf.replace("$VAR$", self.var_path)
|
||||
- buf = buf.replace("$SCRIPTS_BIN$", self._install_scripts)
|
||||
+ buf = buf.replace("$ETC$", "/etc/shinken")
|
||||
+ buf = buf.replace("$VAR$", "/var/lib/shinken")
|
||||
+ buf = buf.replace("$SCRIPTS_BIN$", "/usr/bin")
|
||||
# write out the new file
|
||||
f = open(outfile, "w")
|
||||
f.write(buf)
|
||||
@@ -192,21 +192,19 @@
|
||||
for name in daemon_ini_files:
|
||||
inname = os.path.join('etc', name)
|
||||
outname = os.path.join(self.build_dir, name)
|
||||
- log.info('updating path in %s : to "%s"' % (outname, self.var_path))
|
||||
+ log.info('updating path in %s : to "%s"' % (outname, "/var/lib/shinken"))
|
||||
|
||||
if False:
|
||||
## disabled for now:
|
||||
## all daemons are now using relative paths by default
|
||||
## (relative to the "VAR" one of /etc/default/shinken)
|
||||
update_file_with_string(inname, outname,
|
||||
- "../var", self.var_path)
|
||||
+ "../var", "/var/lib/shinken")
|
||||
|
||||
# but we have to force the user/group & workdir values still:
|
||||
append_file_with(inname, outname, """
|
||||
-user=%s
|
||||
-group=%s
|
||||
workdir=%s
|
||||
-""" % ( self.owner, self.group, self.var_path, ))
|
||||
+""" % ( "/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 +214,7 @@
|
||||
log.info('updating path in %s', outname)
|
||||
update_file_with_string(inname, outname,
|
||||
"/usr/local/shinken/libexec",
|
||||
- self.plugins_path)
|
||||
+ "/usr/lib/nagios/plugins")
|
||||
|
||||
# And update the nagios.cfg file for all /usr/local/shinken/var
|
||||
# value with good one
|
||||
@@ -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",
|
||||
- self.var_path)
|
||||
+ "/var/lib/shinken")
|
||||
|
||||
## but we HAVE to set the shinken_user & shinken_group to thoses requested :
|
||||
append_file_with(inname, outname, """
|
||||
@@ -416,7 +414,7 @@
|
||||
},
|
||||
|
||||
name = "Shinken",
|
||||
- version = "0.6",
|
||||
+ version = "0.6.5",
|
||||
packages = find_packages(),
|
||||
package_data = {'':['*.py','modules/*.py','modules/*/*.py']},
|
||||
description = "Shinken is a monitoring tool compatible with Nagios configuration and plugins",
|
||||
@@ -484,29 +482,6 @@
|
||||
glob('etc/certs/[!_]*.pem')
|
||||
),
|
||||
|
||||
- (
|
||||
- os.path.join('/etc', 'init.d'),
|
||||
- [
|
||||
- 'bin/init.d/shinken',
|
||||
- 'bin/init.d/shinken-arbiter',
|
||||
- 'bin/init.d/shinken-broker',
|
||||
- 'bin/init.d/shinken-receiver',
|
||||
- 'bin/init.d/shinken-poller',
|
||||
- 'bin/init.d/shinken-reactionner',
|
||||
- 'bin/init.d/shinken-scheduler'
|
||||
- ]
|
||||
- ),
|
||||
-
|
||||
- (
|
||||
- os.path.join(etc_root, 'default',),
|
||||
- [ 'build/bin/default/shinken' ]
|
||||
- ),
|
||||
-
|
||||
- (
|
||||
- default_paths['var'],
|
||||
- [ 'var/void_for_git' ]
|
||||
- ),
|
||||
-
|
||||
(
|
||||
default_paths['libexec'], ['libexec/check.sh']
|
||||
),
|
@@ -82,3 +82,4 @@ RECEIVERDEBUGFILE="/var/log/shinken/receiver-debug.log"
|
||||
# nicelevel to run nagios daemon with
|
||||
NICENESS=5
|
||||
|
||||
SHINKENSERVICES=""
|
||||
|
@@ -15,7 +15,6 @@ eval DEBUGFILE="\${${_MODULE}DEBUGFILE}"
|
||||
eval CONFIGFILE="\${${_MODULE}CFG}"
|
||||
eval PIDFILE="\${${_MODULE}PID}"
|
||||
SHINKENM="/usr/bin/shinken-${MODULE}"
|
||||
NEED="net"
|
||||
|
||||
if [ -r "${CONFIGFILE}" ] ; then
|
||||
tmppid=`grep 'pidfile=' ${CONFIGFILE} | grep -v '#' | tail -n 1 | awk -F '=' '{print $2}'`
|
||||
@@ -28,6 +27,9 @@ fi
|
||||
|
||||
depend() {
|
||||
need net
|
||||
if [ $SVCNAME = "shinken" ]; then
|
||||
need ${SHINKENSERVICES}
|
||||
fi
|
||||
}
|
||||
|
||||
start() {
|
||||
@@ -55,3 +57,6 @@ check() {
|
||||
"/usr/bin/shinken-arbiter" -v --config "${ARBITERCFG}" --config "${SHINKENSPECIFICCFG}" $DEBUGCMD 2>&1
|
||||
return $?
|
||||
}
|
||||
|
||||
# vim: filetype=gentoo-init-d sw=2 ts=2 sts=2 noet:
|
||||
|
||||
|
Reference in New Issue
Block a user