Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Prepare minimal sympa.conf at install time (cf. #508) #547

Merged
merged 2 commits into from
Feb 11, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -17,10 +17,12 @@ Makefile
/config.status
/po/sympa/POTFILES
/po/web_help/POTFILES
/sympa.conf

# make

*.1
*.3Sympa
*.5
*.8
*.gmo
Expand Down Expand Up @@ -50,7 +52,6 @@ Makefile

/data_structure.version
/sympa_wizard.pl.inst
/src/lib/*.3Sympa

# make dist

Expand Down
35 changes: 10 additions & 25 deletions Makefile.am
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ EXTRA_DIST = \
$(noinst_SCRIPTS) \
$(nobase_modules_DATA)

CLEANFILES = sympa_wizard.pl.inst
CLEANFILES =

MSGFMT=@MSGFMT@
.po.mo:
Expand Down Expand Up @@ -112,7 +112,7 @@ installdir:
done
@echo "Creating writable directories"
-@for dir in $(expldir) $(spooldir) $(bouncedir) $(arcdir) $(piddir) \
$(sysconfdir); do \
$(confdir) $(sysconfdir); do \
if [ ! -d $(DESTDIR)$$dir ] ; then \
echo "Creating $(DESTDIR)$$dir"; \
$(INSTALL) -d -m 755 $(DESTDIR)$$dir; \
Expand All @@ -129,25 +129,11 @@ installdir:
chgrp $(GROUP) $(DESTDIR)$(spooldir)/$$subdir; \
done

sympa_wizard.pl.inst: $(top_srcdir)/src/sbin/sympa_wizard.pl.in Makefile
$(SED) \
-e 's|--PERL--|$(PERL)|' \
-e 's|--modulesdir--|$(top_srcdir)/src/lib|' \
< $(top_srcdir)/src/sbin/sympa_wizard.pl.in > $@

installconfig: installdir sympa_wizard.pl.inst
installconfig: installdir
@echo "Installing basic configuration ..."
-@export PERL5LIB=$(DESTDIR)$(modulesdir); \
if [ ! -f $(DESTDIR)$(confdir)/sympa.conf ]; then \
echo "This looks like your first Sympa installation. The following wizard will assist you to create your first Sympa configuration.";\
if [ ! -d $(DESTDIR)$(confdir) ]; then \
$(INSTALL) -d -m 755 $(DESTDIR)$(confdir); \
fi; \
chown $(USER) $(DESTDIR)$(confdir); \
chgrp $(GROUP) $(DESTDIR)$(confdir); \
$(PERL) sympa_wizard.pl.inst \
--create sympa.conf \
--target $(DESTDIR)$(confdir)/sympa.conf; \
-@if [ ! -f $(DESTDIR)$(confdir)/sympa.conf ]; then \
echo "installing sympa.conf"; \
$(INSTALL) -m 640 sympa.conf $(DESTDIR)$(confdir); \
chown $(USER) $(DESTDIR)$(confdir)/sympa.conf; \
chgrp $(GROUP) $(DESTDIR)$(confdir)/sympa.conf; \
fi
Expand Down Expand Up @@ -185,13 +171,12 @@ nextstep:
@echo ""
@echo "#########################################################"
@echo "# CHECK YOU HAVE ALL THE NEEDED MODULES:"
@echo "# * Check the required perl modules are installed:"
@echo "# $(sbindir)/sympa_wizard.pl --check"
@echo "# * Install or upgrade required perl modules. If you have cpanminus:"
@echo "# cpanm --installdeps --with-recommends ."
@echo "#"
@echo "# FIRST INSTALLATION:"
@echo "# * Check the INSTALL.md file."
@echo "# * Run the wizard to define some required parameters that can't be guessed."
@echo "# $(sbindir)/sympa_wizard.pl"
@echo "# * Edit this file to define initial configuration:"
@echo "# $(confdir)/sympa.conf"
@echo "#"
@echo "# UPGRADING"
@echo "# * Run this script to upgrade your data structures:"
Expand Down
1 change: 1 addition & 0 deletions configure.ac
Original file line number Diff line number Diff line change
Expand Up @@ -609,6 +609,7 @@ AC_SUBST(POSTMAP_ARG)

AC_CONFIG_FILES([
Makefile
sympa.conf
default/Makefile
doc/Makefile
po/Makefile
Expand Down
64 changes: 64 additions & 0 deletions sympa.conf.in
Original file line number Diff line number Diff line change
@@ -0,0 +1,64 @@
########################################################################
# Initial configuration
# See https://sympa-community.github.io/manual/install/generate-initial-configuration.html
########################################################################

domain (You must define this parameter)
listmaster (You must define this parameter)
#lang en-US

########################################################################
# Setup database
# See https://sympa-community.github.io/manual/install/setup-database.html
########################################################################

db_type (You must define this parameter)
db_name sympa
#db_host
#db_port
#db_user user_name
#db_passwd (secret)
#db_env

########################################################################
# Configure system log
# See https://sympa-community.github.io/manual/install/configure-system-log.html
########################################################################

#syslog LOCAL1
#log_socket_type unix

########################################################################
# Configure mail server
# See https://sympa-community.github.io/manual/install/configure-mail-server.html
########################################################################

#sendmail_aliases @SENDMAIL_ALIASES@
#aliases_program newaliases
#aliases_db_type hash
#sendmail /usr/sbin/sendmail
#sendmail_args (if you use sendmail(1), this need not change)

########################################################################
# Configure HTTP server
# See https://sympa-community.github.io/manual/install/configure-http-server.html
########################################################################

#mhonarc /usr/bin/mhonarc
#log_facility LOCAL1

# If you chose single domain setting, you may have to define following
# parameters in this sympa.conf file. Otherwise, if you chose virtual
# domain setting (recommended), you should define them in robot.conf by
# each domain.

#wwsympa_url (You must define this parameter to enable web interface)

########################################################################
# Customizing Sympa
# You can customize Sympa, its web interface and/or SOAP/HTTP service
# defining more parameters in this file sympa.conf or robot.conf by each
# domain.
# For more details see https://sympa-community.github.io/manual/customize.html
########################################################################