fwtool: initial ipv6 support and puppet integration
[hcoop/domtool2.git] / Makefile
index 7b85747..1019e9a 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -32,7 +32,7 @@ config.sml:
 mlton: bin/domtool-server bin/domtool-client bin/domtool-slave \
        bin/domtool-admin bin/domtool-doc bin/dbtool bin/vmail \
        bin/smtplog bin/setsa bin/mysql-fixperms bin/webbw bin/domtool-tail \
-       bin/fwtool bin/domtool-config
+       bin/fwtool bin/domtool-config bin/domtool-portal
 
 smlnj: $(COMMON_DEPS) openssl/smlnj/FFI/libssl.h.cm pcre/smlnj/FFI/libpcre.h.cm \
        src/domtool.cm
@@ -125,6 +125,10 @@ src/domtool-config.mlb: src/prefix.mlb src/sources src/suffix.mlb
        $(MAKE_MLB_BASE) >src/domtool-config.mlb
        echo "main-config.sml" >>src/domtool-config.mlb
 
+src/domtool-portal.mlb: src/prefix.mlb src/sources src/suffix.mlb
+       $(MAKE_MLB_BASE) >src/domtool-portal.mlb
+       echo "main-portal.sml" >>src/domtool-portal.mlb
+
 openssl/smlnj/FFI/libssl.h.cm: openssl/openssl_sml.h
        cd openssl/smlnj ; ml-nlffigen -d FFI -lh LibsslH.libh -include ../libssl-h.sml \
        -cm libssl.h.cm -D__builtin_va_list="void*" \
@@ -215,6 +219,9 @@ bin/domtool-tail: $(COMMON_MLTON_DEPS) src/tail/tail.mlb src/tail/*.sml
 bin/domtool-config: $(COMMON_MLTON_DEPS) src/domtool-config.mlb src/main-config.sml
        $(MLTON) -output bin/domtool-config src/domtool-config.mlb
 
+bin/domtool-portal: $(COMMON_MLTON_DEPS) src/domtool-portal.mlb src/main-portal.sml
+       $(MLTON) -output bin/domtool-portal src/domtool-portal.mlb
+
 elisp/domtool-tables.el: lib/*.dtl bin/domtool-doc
        bin/domtool-doc -basis -emacs >$@
 
@@ -226,6 +233,7 @@ install: install_sos
        cp scripts/domtool-publish /usr/local/sbin/
        cp scripts/domtool-reset-global /usr/local/sbin/
        cp scripts/domtool-reset-local /usr/local/sbin/
+       cp scripts/domtool-vmailpasswd /usr/local/sbin/
        cp scripts/domtool-adduser /usr/local/bin/
        cp scripts/domtool-addcert /usr/local/bin/
        cp scripts/domtool-readdcerts /usr/local/bin/
@@ -252,9 +260,11 @@ install: install_sos
        -cp bin/domtool-tail /usr/local/bin/
        -chmod +s /usr/local/bin/domtool-tail
        cp bin/domtool-config /usr/local/bin/
+       cp bin/domtool-portal /usr/local/sbin/
        cp src/plugins/domtool-postgres /usr/local/sbin/
        cp src/plugins/domtool-mysql /usr/local/sbin/
        -mkdir -p $(EMACS_DIR)
+       install -d -m 755 -o domtool -g nogroup /var/domtool
        cp elisp/*.el $(EMACS_DIR)/
 
 .PHONY: grab_lib install_server install_slave
@@ -262,19 +272,27 @@ install: install_sos
 grab_lib:
        rsync -r --delete /afs/hcoop.net/common/etc/domtool/lib/* lib/
 
+install_systemd_dispatcher:
+       install -m 644 -o root -g root scripts/domtool-server.service /etc/systemd/system/domtool-slave.service
+       systemctl daemon-reload
+
+install_systemd_worker:
+       install -m 644 -o root -g root scripts/domtool-slave.service /etc/systemd/system/domtool-slave.service
+       systemctl daemon-reload
+
 install_serverslave:
-       /etc/init.d/domtool-server stop
-       /etc/init.d/domtool-slave stop
+       service domtool-server stop
+       service domtool-slave stop
        make install
-       /etc/init.d/domtool-server start
-       /etc/init.d/domtool-slave start
+       service domtool-server start
+       service domtool-slave start
 
 install_server:
-       /etc/init.d/domtool-server stop
+       service domtool-server stop
        make install
-       /etc/init.d/domtool-server start
+       service domtool-server start
 
 install_slave:
-       /etc/init.d/domtool-slave stop
+       service domtool-slave stop
        make install
-       /etc/init.d/domtool-slave start
+       service domtool-slave start