summaryrefslogtreecommitdiff
path: root/databases/mysqld_exporter/files/smf/mysqld_exporter.sh
blob: cb27d7de75e2f6446797cdf4579a1e3acfcdfdf2 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
#!@SMF_METHOD_SHELL@
#
# $NetBSD: mysqld_exporter.sh,v 1.1 2021/02/11 13:54:29 jperkin Exp $
#
# Init script for mysqld_exporter.  This is non-standard, but required so
# that we can source a configuration file and pass environment variables that
# include the database password to the program.
#
# As we need to use it anyway, we use it for everything, rather than splitting
# configuration between the config file and SMF variables.
#

. /lib/svc/share/smf_include.sh

. @PKG_SYSCONFDIR@/env.conf

case "$1" in
start)
	@LOCALBASE@/bin/mysqld_exporter ${MYSQLD_EXPORTER_FLAGS}
	;;
*)
	echo "Usage: $0 start" >&2
	exit 1
	;;
esac

exit ${SMF_EXIT_OK}