Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 2 Apr 2012 14:37:46 -0700 (PDT)
From:      wwwdrich <drich@employees.org>
To:        freebsd-ports@freebsd.org
Subject:   Re: multimedia/zoneminder: rc script runs mysql commands?
Message-ID:  <1333402666757-5613799.post@n5.nabble.com>
In-Reply-To: <op.v7xnyty734t2sn@tech304>
References:  <op.v7xljag634t2sn@tech304> <4F0DD20D.7010002@passap.ru> <op.v7xnjdfz34t2sn@tech304> <4F0DD88A.9040805@FreeBSD.org> <op.v7xnyty734t2sn@tech304>

next in thread | previous in thread | raw e-mail | index | archive | help
I have a K.I.S.S. solution I have been running for a while. Just source the
zm.conf file into the init script and then use the variables there for the
mysql test. The way I'm doing it is:

        . /usr/local/etc/zm.conf
        while : ; do
                echo "USE zm; SELECT Username from Users where Id=1;" | \
                        /usr/local/bin/mysqltest -h ${ZM_DB_HOST} -u
${ZM_DB_USER} -p${ZM_DB_PASS} ${ZM_DB_NAME} > /dev/null 2>&1 && return


--
View this message in context: http://freebsd.1045724.n5.nabble.com/multimedia-zoneminder-rc-script-runs-mysql-commands-tp5137566p5613799.html
Sent from the freebsd-ports mailing list archive at Nabble.com.



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?1333402666757-5613799.post>