Skip to content
Snippets Groups Projects
Commit dcc670d2 authored by Guillaume ROUSSE's avatar Guillaume ROUSSE
Browse files

install configuration under access-check subdirectory

parent 8018cbe2
No related branches found
No related tags found
No related merge requests found
......@@ -9,13 +9,13 @@ EXTRA_DIST = access-check-manager.pl.in access-check-manager.cgi.in
access-check-manager.pl: Makefile access-check-manager.pl.in
sed \
-e 's|[@]modulesdir[@]|$(modulesdir)|' \
-e 's|[@]sysconfdir[@]|$(sysconfdir)|' \
-e 's|[@]confdir[@]|$(confdir)|' \
< $(srcdir)/$@.in > $@
chmod +x $@
access-check-manager.cgi: Makefile access-check-manager.cgi.in
sed \
-e 's|[@]modulesdir[@]|$(modulesdir)|' \
-e 's|[@]sysconfdir[@]|$(sysconfdir)|' \
-e 's|[@]confdir[@]|$(confdir)|' \
< $(srcdir)/$@.in > $@
chmod +x $@
......@@ -10,7 +10,7 @@ use Config::Tiny;
use AccountManager::App;
my $configuration_file =
$ENV{ACCOUNTMANAGER_CONFIG} || '@sysconfdir@/manager.conf';
$ENV{ACCOUNTMANAGER_CONFIG} || '@confdir@/manager.conf';
my $configuration = Config::Tiny->read($configuration_file);
my $app = AccountManager::App->new(
......
......@@ -47,7 +47,7 @@ pod2usage(
) unless $action;
my $configuration_file =
$options{configuration} || '@sysconfdir@/manager.conf';
$options{configuration} || '@confdir@/manager.conf';
my $configuration = Config::Tiny->read($configuration_file);
AccountManager::DB->register_db(
......
......@@ -7,17 +7,17 @@ EXTRA_DIST = manager.conf.in
manager.conf: Makefile manager.conf.in
sed \
-e 's|[@]templatesdir[@]|$(templatesdir)|' \
-e 's|[@]sysconfdir[@]|$(sysconfdir)|' \
-e 's|[@]confdir[@]|$(confdir)|' \
< $(srcdir)/$@.in > $@
chmod +x $@
install-data-local:
$(mkinstalldirs) $(DESTDIR)$(sysconfdir)
if [ -f $(DESTDIR)$(sysconfdir)/manager.conf ]; then \
$(INSTALL_DATA) manager.conf $(DESTDIR)$(sysconfdir)/manager.conf.new; \
$(mkinstalldirs) $(DESTDIR)$(confdir)
if [ -f $(DESTDIR)$(confdir)/manager.conf ]; then \
$(INSTALL_DATA) manager.conf $(DESTDIR)$(confdir)/manager.conf.new; \
else \
$(INSTALL_DATA) manager.conf $(DESTDIR)$(sysconfdir)/manager.conf; \
$(INSTALL_DATA) manager.conf $(DESTDIR)$(confdir)/manager.conf; \
fi
uninstall-local:
rm -f $(DESTDIR)$(sysconfdir)/manager.conf
rm -f $(DESTDIR)$(confdir)/manager.conf
......@@ -3,10 +3,12 @@ AC_INIT([Access Check Manager], 1.0)
AM_INIT_AUTOMAKE([foreign])
AC_REQUIRE_AUX_FILE([tap-driver.sh])
confdir=$sysconfdir/access-check
wwwdir=$datadir/access-check/www
modulesdir=$datadir/access-check/lib
templatesdir=$datadir/access-check/templates
AC_SUBST(confdir)
AC_SUBST(wwwdir)
AC_SUBST(modulesdir)
AC_SUBST(templatesdir)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment