pkgsrc/net/icinga-base/patches/patch-module_idoutils_db_scripts_create__pgsqldb.sh
ryoon f470163348 Import icinga-base-1.8.4 as net/icinga-base.
Icinga is a program that will monitor hosts and services on your
network.  It has the ability to email or page you when a problem arises
and when it gets resolved.  Icinga is written in C and is designed to
run under Linux, although it should work under most other *NIX variants.
It can run either as a normal process or as a daemon, intermittently
running checks on various services that you specify.  The actual service
checks are performed by external "plugins" which return service
information to Icinga.  Several CGI programs are included with Icinga
in order to allow you to view the current service status, history, etc.
via a web browser.

This package provides the core Icinga infrastructure and web pages.

Icinga is a fork of Nagios (net/nagios-base) and Icinga uses
Nagios's plugins (net/nagios-plugins).
2013-03-02 04:08:27 +00:00

29 lines
906 B
Bash

$NetBSD: patch-module_idoutils_db_scripts_create__pgsqldb.sh,v 1.1 2013/03/02 04:08:27 ryoon Exp $
--- module/idoutils/db/scripts/create_pgsqldb.sh.orig 2013-01-13 22:18:37.000000000 +0000
+++ module/idoutils/db/scripts/create_pgsqldb.sh
@@ -36,7 +36,7 @@ psql postgres >create_pgsqldb.log <<EOS1
CREATE USER $DBUSER WITH PASSWORD '$DBPASS';
\q
EOS1
-if [ $? == 0 ]; then
+if [ $? = 0 ]; then
createlang plpgsql icinga;
echo "Create icinga objects..."
PGPASSWORD=$DBPASS
@@ -51,7 +51,7 @@ select version as DBVersion from icinga_
select now();
\q
EOS2
- if [ $? == 0 ]; then
+ if [ $? = 0 ]; then
echo "Database ready"
else
echo "Database creation failed"
@@ -75,4 +75,4 @@ echo "Dont forget to modify pg_hba.conf
rm -rf /tmp/pgsql
echo "Logfiles:"
ls -l *pgsql*.log
-exit $RET
\ No newline at end of file
+exit $RET