From 109680fcb0b75f525d832e22d15d8bf94128e6ec Mon Sep 17 00:00:00 2001 From: b Date: Sat, 23 Mar 2024 22:37:24 +0000 Subject: [PATCH] generate apache config file --- makefile | 21 ++++++++++++++++----- makefile.1.mak | 15 +++++++++++++-- mscha.1.conf | 12 ++++++++++++ mscha.conf | 8 -------- settings-debug.txt | 1 + settings.txt | 41 ++++++++++++++++++++++++++++++++++++++--- 6 files changed, 80 insertions(+), 18 deletions(-) create mode 100644 mscha.1.conf delete mode 100644 mscha.conf diff --git a/makefile b/makefile index 9190035..2adbaa2 100644 --- a/makefile +++ b/makefile @@ -31,9 +31,9 @@ MKDIR = /usr/bin/mkdir PERL = /usr/bin/perl RM = /usr/bin/rm -BIN_PATH = /botm/bin/test-ottbackup/mscha -LIB_PATH = /botm/lib/test-ottbackup/mscha -WWW_PATH = /botm/www/1190/mschatest +BIN_PATH = /botm/bin/test-ottbackup/mscha/ +LIB_PATH = /botm/lib/test-ottbackup/mscha/ +WWW_PATH = /botm/www/1190/mschatest/ CONF = /botm/etc/www/conf/1190/test-mscha.conf @@ -44,6 +44,13 @@ DEFAULT_CONFIGFILE = settings-$(DEFAULT_TARGET).txt settings.txt # The configuration tool CONFIGURE_CMD = $(PERL) ./configure.pl --do $(CONFIGFILE) +# keep these 2 lists in the same order!: +GENERATE_FROM=\ +mscha.1.conf + +TO_GENERATE=\ +mscha.conf + EXEC=\ frame.pl\ frameaftertime.pl\ @@ -62,7 +69,7 @@ $(LIB_PATH)\ $(WWW_PATH) -all: exec +all: exec $(TO_GENERATE) install: cp_bin cp_lib cp_conf cp_www @@ -76,6 +83,10 @@ configure.pl: $(CONFIGFILE) config/configure.1.pl $(PERL) config/configure.1.pl target=direct settings-$(TARGET).txt config/settings.txt --in config/configure.1.pl --out configure.pl +$(TO_GENERATE): $(GENERATE_FROM) $(CONFIGFILE) configure.pl + $(CONFIGURE_CMD) --in $(GENERATE_FROM) --out $(TO_GENERATE) + + mktree: $(MKDIR) -p $(DIR) # $(CHMOD) g-r,g-w,g-x,o-r,o-w,o-x $(HIDDEN_DIR) @@ -106,7 +117,7 @@ exec: $(EXEC) clean: - $(RM) -f configure.pl + $(RM) -f configure.pl $(TO_GENERATE) $(PERL) config/configure.1.pl --do $(DEFAULT_CONFIGFILE) --in makefile.1.mak --out makefile PHONY: all clean cp_bin cp_conf cp_lib cp_www cp_www_data exec install install_all mktree diff --git a/makefile.1.mak b/makefile.1.mak index b9ada15..e1aabf2 100644 --- a/makefile.1.mak +++ b/makefile.1.mak @@ -44,6 +44,13 @@ DEFAULT_CONFIGFILE = settings-$(DEFAULT_TARGET).txt settings.txt # The configuration tool CONFIGURE_CMD = $(PERL) ./configure.pl --do $(CONFIGFILE) +# keep these 2 lists in the same order!: +GENERATE_FROM=\ +mscha.1.conf + +TO_GENERATE=\ +mscha.conf + EXEC=\ frame.pl\ frameaftertime.pl\ @@ -62,7 +69,7 @@ $(LIB_PATH)\ $(WWW_PATH) -all: exec +all: exec $(TO_GENERATE) install: cp_bin cp_lib cp_conf cp_www @@ -76,6 +83,10 @@ configure.pl: $(CONFIGFILE) config/configure.1.pl $(PERL) config/configure.1.pl target=direct settings-$(TARGET).txt config/settings.txt --in config/configure.1.pl --out configure.pl +$(TO_GENERATE): $(GENERATE_FROM) $(CONFIGFILE) configure.pl + $(CONFIGURE_CMD) --in $(GENERATE_FROM) --out $(TO_GENERATE) + + mktree: $(MKDIR) -p $(DIR) # $(CHMOD) g-r,g-w,g-x,o-r,o-w,o-x $(HIDDEN_DIR) @@ -106,7 +117,7 @@ exec: $(EXEC) clean: - $(RM) -f configure.pl + $(RM) -f configure.pl $(TO_GENERATE) $(PERL) config/configure.1.pl --do $(DEFAULT_CONFIGFILE) --in makefile.1.mak --out makefile PHONY: all clean cp_bin cp_conf cp_lib cp_www cp_www_data exec install install_all mktree diff --git a/mscha.1.conf b/mscha.1.conf new file mode 100644 index 0000000..f90dbe7 --- /dev/null +++ b/mscha.1.conf @@ -0,0 +1,12 @@ +# mscha.conf is automatically generated from mscha.1.conf + +ScriptAlias ###CONF_CGI_VIEW; ###CONF_BIN_VIEW; +ScriptAlias ###CONF_CGI_TAT_VIEW; ###CONF_BIN_TAT_VIEW; +ScriptAlias ###CONF_CGI_VIEW_2; ###CONF_BIN_VIEW; +ScriptAlias ###CONF_CGI_TAT_VIEW_2; ###CONF_BIN_TAT_VIEW; +ScriptAlias ###CONF_CGI_FRAME; ###CONF_BIN_FRAME; +ScriptAlias ###CONF_CGI_TAT_FRAME; ###CONF_BIN_TAT_FRAME; + + + Require all granted + \ No newline at end of file diff --git a/mscha.conf b/mscha.conf deleted file mode 100644 index 60b2aff..0000000 --- a/mscha.conf +++ /dev/null @@ -1,8 +0,0 @@ -# #mscha -# -# ScriptAlias /mscha/viewer /eizm/bin/ottbackup/mscha/viewer.pl -# ScriptAlias /mscha/vieweraftertime /eizm/bin/ottbackup/mscha/vieweraftertime.pl -# ScriptAlias /mscha/view.fcgi /eizm/bin/ottbackup/mscha/viewer.pl -# ScriptAlias /mscha/viewaftertime.fcgi /eizm/bin/ottbackup/mscha/vieweraftertime.pl -# ScriptAlias /mscha/frame /eizm/bin/ottbackup/mscha/frame.pl -# ScriptAlias /mscha/frameaftertime /eizm/bin/ottbackup/mscha/frameaftertime.pl diff --git a/settings-debug.txt b/settings-debug.txt index 50f8eb2..abb4b57 100644 --- a/settings-debug.txt +++ b/settings-debug.txt @@ -6,6 +6,7 @@ target: debug name: test-mscha bin_path : /botm/bin/test-ottbackup/mscha +cgi_path : /mschatest conf_path: /botm/etc/www/conf/1190 lib_path : /botm/lib/test-ottbackup/mscha www_path : /botm/www/1190/mschatest diff --git a/settings.txt b/settings.txt index 1fa7611..1e3369f 100644 --- a/settings.txt +++ b/settings.txt @@ -15,8 +15,43 @@ # You should have received a copy of the GNU Affero General Public License # along with this program. If not, see . +_bin_path = @_PATH($bin_path, ) +_bin_frame_path = @_PATH($bin_path, frame.pl ) +_bin_tat_frame_path = @_PATH($bin_path, frameaftertime.pl ) +_bin_tat_view_path = @_PATH($bin_path, vieweraftertime.pl) +_bin_view_path = @_PATH($bin_path, viewer.pl ) + +_cgi_path = @_PATH($cgi_path, ) +_cgi_frame_path = @_PATH($cgi_path, frame ) +_cgi_tat_frame_path = @_PATH($cgi_path, frameaftertime ) +_cgi_tat_view_path = @_PATH($cgi_path, vieweraftertime ) +_cgi_tat_view_2_path = @_PATH($cgi_path, viewaftertime.fcgi) +_cgi_view_path = @_PATH($cgi_path, viewer ) +_cgi_view_2_path = @_PATH($cgi_path, view.fcgi ) + _conf_path = @_PATH($conf_path, $name\.conf) +_lib_path = @_PATH($lib_path,) +_www_path = @_PATH($www_path,) + + +CONF_BIN = $_bin_path +CONF_BIN_FRAME = $_bin_frame_path +CONF_BIN_TAT_FRAME = $_bin_tat_frame_path +CONF_BIN_TAT_VIEW = $_bin_tat_view_path +CONF_BIN_VIEW = $_bin_view_path + +CONF_CGI_FRAME = $_cgi_tat_view_path +CONF_CGI_TAT_FRAME = $_cgi_tat_view_path +CONF_CGI_TAT_VIEW = $_cgi_tat_view_path +CONF_CGI_TAT_VIEW_2 = $_cgi_tat_view_2_path +CONF_CGI_VIEW = $_cgi_view_path +CONF_CGI_VIEW_2 = $_cgi_view_2_path + + + + + MAKE_TARGET = TARGET = $target @@ -26,8 +61,8 @@ MAKE_MKDIR = MKDIR = $mkdir MAKE_PERL = PERL = $perl MAKE_RM = RM = $rm -MAKE_BIN_PATH = BIN_PATH = $bin_path -MAKE_LIB_PATH = LIB_PATH = $lib_path -MAKE_WWW_PATH = WWW_PATH = $www_path +MAKE_BIN_PATH = BIN_PATH = $_bin_path +MAKE_LIB_PATH = LIB_PATH = $_lib_path +MAKE_WWW_PATH = WWW_PATH = $_www_path MAKE_CONF = CONF = $_conf_path -- 2.30.2