From f0a6f9bf943ff8eb8107a15ddf509f86de38c00e Mon Sep 17 00:00:00 2001 From: Nishi Date: Mon, 23 Sep 2024 10:30:00 +0000 Subject: [PATCH] fix genconf git-svn-id: file:///raid/svn-personal/tewi/trunk@131 8739d7e6-ffea-ec47-b151-bdff447c6205 --- Makefile | 2 +- Server/tw_version.h | 2 +- Tool/genconf.c | 6 +++--- installer.sh | 4 ++-- 4 files changed, 7 insertions(+), 7 deletions(-) diff --git a/Makefile b/Makefile index de7e8f2..45d00eb 100644 --- a/Makefile +++ b/Makefile @@ -35,7 +35,7 @@ all: ./Server ./Module ./Manpage ./Tool/genconf ./Tool/itworks install: all ./Tool/genconf ./Tool/itworks mkdir -p $(PREFIX)/bin $(PREFIX)/lib/tewi $(PREFIX)/share/man/man5 $(PREFIX)/etc $(PREFIX)/www - if [ ! -e $(PREFIX)/etc/tewi.conf ]; then ( ./Tool/genconf $(PREFIX) > $(PREFIX)/etc/tewi.conf || ( rm $(PREFIX)/etc/tewi.conf ; exit 1 ) ) ; fi + if [ ! -e $(PREFIX)/etc/tewi.conf ]; then ( ./Tool/genconf $(PREFIX) lib/tewi so > $(PREFIX)/etc/tewi.conf || ( rm $(PREFIX)/etc/tewi.conf ; exit 1 ) ) ; fi if [ ! -e $(PREFIX)/www/index.html ]; then ( ./Tool/itworks > $(PREFIX)/www/index.html || ( rm $(PREFIX)/www/index.html ; exit 1 ) ) ; fi if [ ! -e $(PREFIX)/www/pbtewi.gif ]; then ( cp Binary/pbtewi.gif $(PREFIX)/www/ || ( rm $(PREFIX)/www/pbtewi.gif ; exit 1 ) ) ; fi cp ./Server/tewi $(PREFIX)/bin/ diff --git a/Server/tw_version.h b/Server/tw_version.h index c7889d9..beb0f3a 100644 --- a/Server/tw_version.h +++ b/Server/tw_version.h @@ -3,7 +3,7 @@ #ifndef __TW_VERSION_H__ #define __TW_VERSION_H__ -#define TW_VERSION "1.04A\0" +#define TW_VERSION "1.04B\0" const char* tw_get_version(void); const char* tw_get_platform(void); diff --git a/Tool/genconf.c b/Tool/genconf.c index ef4244b..4853ca3 100644 --- a/Tool/genconf.c +++ b/Tool/genconf.c @@ -5,7 +5,7 @@ #include int main(int argc, char** argv) { - if(argc < 2) { + if(argc < 4) { return 1; } printf("##\n"); @@ -18,8 +18,8 @@ int main(int argc, char** argv) { printf("\n"); printf("ServerAdmin %s\n", SERVER_ADMIN); printf("\n"); - printf("LoadModule lib/tewi/mod_cgi.so\n"); - printf("#LoadModule lib/tewi/mod_proxy.so\n"); + printf("LoadModule %s/mod_cgi.%s\n", argv[2], argv[3]); + printf("#LoadModule %s/mod_proxy.%s\n", argv[2], argv[3]); printf("\n"); printf("Listen 80\n"); printf("#ListenSSL 443\n"); diff --git a/installer.sh b/installer.sh index 5c784e0..85878c7 100755 --- a/installer.sh +++ b/installer.sh @@ -22,7 +22,7 @@ make clean || fail make PLATFORM=$1-service -j4 || fail cp Server/tewi.exe tewi-service.exe cd Server -../Tool/genconf "C:/Tewi" > ../generated.conf +../Tool/genconf "C:/Tewi" modules dll > ../generated.conf ../Tool/itworks > ../itworks.html makensis -DVERSION=$VERSION install.nsi cp install.exe ../install-nossl.exe @@ -38,7 +38,7 @@ make clean || fail make PLATFORM=$1-service -j4 || fail cp Server/tewi.exe tewi-service.exe cd Server -../Tool/genconf "C:/Tewi" > ../generated.conf +../Tool/genconf "C:/Tewi" modules dll > ../generated.conf ../Tool/itworks > ../itworks.html makensis -DVERSION=$VERSION install.nsi cp install.exe ../install-ssl.exe -- 2.43.0