Changeset 469
- Timestamp:
- 04/10/07 23:01:25
(2 years ago)
- Author:
- malte
- Message:
--
-
Files:
-
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
| r154 |
r469 |
|
| 6 | 6 | install: |
|---|
| 7 | 7 | cd ./build && $(MAKE) install |
|---|
| 8 | | cd ./daemon && $(MAKE) vhcs2_daemon |
|---|
| | 8 | cd ./daemon && $(MAKE) ispcp_daemon |
|---|
| 9 | 9 | $(SYSTEM_MAKE_DIRS) $(DAEMON_DIR) |
|---|
| 10 | | cp ./daemon/vhcs2_daemon $(DAEMON_DIR) |
|---|
| | 10 | cp ./daemon/ispcp_daemon $(DAEMON_DIR) |
|---|
| 11 | 11 | |
|---|
| 12 | 12 | uninstall: |
|---|
| r154 |
r469 |
|
| 6 | 6 | install: |
|---|
| 7 | 7 | cd ./build && $(MAKE) install |
|---|
| 8 | | cd ./daemon && $(MAKE) vhcs2_daemon |
|---|
| | 8 | cd ./daemon && $(MAKE) ispcp_daemon |
|---|
| 9 | 9 | $(SYSTEM_MAKE_DIRS) $(DAEMON_DIR) |
|---|
| 10 | | cp ./daemon/vhcs2_daemon $(DAEMON_DIR) |
|---|
| | 10 | cp ./daemon/ispcp_daemon $(DAEMON_DIR) |
|---|
| 11 | 11 | |
|---|
| 12 | 12 | uninstall: |
|---|
| r154 |
r469 |
|
| 3 | 3 | install: |
|---|
| 4 | 4 | |
|---|
| 5 | | $(CMD_INSTALL) ./vhcs2-mkdirs.pl /usr/sbin |
|---|
| | 5 | $(CMD_INSTALL) ./ispcp-mkdirs.pl /usr/sbin |
|---|
| 6 | 6 | |
|---|
| 7 | 7 | uninstall: |
|---|
| 8 | 8 | |
|---|
| 9 | | rm -rf /usr/sbin/vhcs2-mkdirs.pl |
|---|
| | 9 | rm -rf /usr/sbin/ispcp-mkdirs.pl |
|---|
| 10 | 10 | |
|---|
| 11 | 11 | |
|---|
| r154 |
r469 |
|
| 6 | 6 | install: |
|---|
| 7 | 7 | |
|---|
| 8 | | $(CMD_INSTALL) ./vhcs2-mkdirs.pl /usr/sbin |
|---|
| | 8 | $(CMD_INSTALL) ./ispcp-mkdirs.pl /usr/sbin |
|---|
| 9 | 9 | |
|---|
| 10 | 10 | uninstall: |
|---|
| 11 | 11 | |
|---|
| 12 | | rm -rf /usr/sbin/vhcs2-mkdirs.pl |
|---|
| | 12 | rm -rf /usr/sbin/ispcp-mkdirs.pl |
|---|
| 13 | 13 | |
|---|
| 14 | 14 | |
|---|
| r384 |
r469 |
|
| 1 | | # VHCS(tm) - Virtual Hosting Control System |
|---|
| 2 | | # Copyright (c) 2001-2004 by moleSoftware GmbH |
|---|
| 3 | | # http://www.molesoftware.com |
|---|
| 4 | 1 | # |
|---|
| | 2 | # ispCP . (OMEGA) - Virtual Hosting Control System | Omega Version |
|---|
| 5 | 3 | # |
|---|
| 6 | | # License: |
|---|
| 7 | | # This program is free software; you can redistribute it and/or |
|---|
| 8 | | # modify it under the terms of the MPL Mozilla Public License |
|---|
| 9 | | # as published by the Free Software Foundation; either version 1.1 |
|---|
| 10 | | # of the License, or (at your option) any later version. |
|---|
| | 4 | # @copyright 2001-2006 by moleSoftware GmbH |
|---|
| | 5 | # @copyright 2006-2007 by ispCP | http://isp-control.net |
|---|
| | 6 | # @link http://isp-control.net |
|---|
| | 7 | # @author ispCP Team |
|---|
| 11 | 8 | # |
|---|
| 12 | | # This program is distributed in the hope that it will be useful, |
|---|
| 13 | | # but WITHOUT ANY WARRANTY; without even the implied warranty of |
|---|
| 14 | | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
|---|
| 15 | | # MPL Mozilla Public License for more details. |
|---|
| 16 | | # |
|---|
| 17 | | # You may have received a copy of the MPL Mozilla Public License |
|---|
| 18 | | # along with this program. |
|---|
| 19 | | # |
|---|
| 20 | | # An on-line copy of the MPL Mozilla Public License can be found |
|---|
| 21 | | # http://www.mozilla.org/MPL/MPL-1.1.html |
|---|
| | 9 | # @license |
|---|
| | 10 | # This program is free software; you can redistribute it and/or modify it under |
|---|
| | 11 | # the terms of the MPL General Public License as published by the Free Software |
|---|
| | 12 | # Foundation; either version 1.1 of the License, or (at your option) any later |
|---|
| | 13 | # version. |
|---|
| | 14 | # You should have received a copy of the MPL Mozilla Public License along with |
|---|
| | 15 | # this program; if not, write to the Open Source Initiative (OSI) |
|---|
| | 16 | # http://opensource.org | osi@opensource.org |
|---|
| 22 | 17 | # |
|---|
| 23 | | # |
|---|
| 24 | | # The VHCS Home Page is at: |
|---|
| 25 | | # |
|---|
| 26 | | # http://www.vhcs.net |
|---|
| 27 | 18 | |
|---|
| 28 | | |
|---|
| 29 | | OBJS = vhcs_daemon.o message.o daemon_init.o say.o signal-handlers.o\ |
|---|
| | 19 | OBJS = ispcp_daemon.o message.o daemon_init.o say.o signal-handlers.o\ |
|---|
| 30 | 20 | receive_data.o send_data.o take_connection.o send_line.o recv_line.o\ |
|---|
| 31 | 21 | helo_cmd.o helo_syntax.o lr_cmd.o lr_syntax.o bye_cmd.o bye_syntax.o |
|---|
| … | … | |
| 37 | 27 | STRIP = strip -s |
|---|
| 38 | 28 | |
|---|
| 39 | | vhcs2_daemon: $(OBJS) |
|---|
| 40 | | $(BUILD) vhcs2_daemon $(OBJS) |
|---|
| 41 | | $(STRIP) vhcs2_daemon |
|---|
| | 29 | ispcp_daemon: $(OBJS) |
|---|
| | 30 | $(BUILD) ispcp_daemon $(OBJS) |
|---|
| | 31 | $(STRIP) ispcp_daemon |
|---|
| 42 | 32 | |
|---|
| 43 | | vhcs_daemon.o: vhcs_daemon.c defs.h |
|---|
| 44 | | $(COMPILE) vhcs_daemon.o vhcs_daemon.c |
|---|
| | 33 | ispcp_daemon.o: ispcp_daemon.c defs.h |
|---|
| | 34 | $(COMPILE) ispcp_daemon.o ispcp_daemon.c |
|---|
| 45 | 35 | |
|---|
| 46 | 36 | daemon_init.o: daemon_init.c daemon_init.h |
|---|
| … | … | |
| 94 | 84 | rm -rf *~ |
|---|
| 95 | 85 | rm -rf *.o |
|---|
| 96 | | rm -rf vhcs2_daemon |
|---|
| | 86 | rm -rf ispcp_daemon |
|---|
| 97 | 87 | |
|---|
| r154 |
r469 |
|
| 177 | 177 | |
|---|
| 178 | 178 | char *messages_array[MSG_MAX_COUNT][1] = { |
|---|
| 179 | | {"250 OK moleSoftware VHCS2 Server Welcomes You !\r\n"}, |
|---|
| 180 | | {"moleSoftware vhcs_daemon v2.02 started !"}, |
|---|
| 181 | | {"vhcs2_daemon"}, |
|---|
| | 179 | {"250 OK ispCP Server Welcomes You !\r\n"}, |
|---|
| | 180 | {"ispCP_daemon v1.0 started !"}, |
|---|
| | 181 | {"ispcp_daemon"}, |
|---|
| 182 | 182 | {"listen() error: %s"}, |
|---|
| 183 | 183 | {"child %s terminated !"}, |
|---|
| … | … | |
| 198 | 198 | {"license status"}, |
|---|
| 199 | 199 | {"execute query"}, |
|---|
| 200 | | {"VHCS Pro configuration file not found !"}, |
|---|
| 201 | | {"VHCS Pro license data cannot be found in the config file !"}, |
|---|
| | 200 | {"ispCP configuration file not found !"}, |
|---|
| | 201 | {"ispCP data cannot be found in the config file !"}, |
|---|
| 202 | 202 | {"Connect to license-server: socket() error [%s]!"}, |
|---|
| 203 | 203 | {"Connect to license-server: connect() error [%s]!"}, |
|---|
| 204 | | {"250 OK moleSoftware Licnese Server Welcomes You !\r\n"}, |
|---|
| | 204 | {"250 OK ispCP Server Welcomes You !\r\n"}, |
|---|
| 205 | 205 | {"999 ERR License error !\r\n"}, |
|---|
| 206 | 206 | {"bind() error: %s ! \r\n Please check for another daemon runing !\r\n "} |
|---|
| … | … | |
| 210 | 210 | |
|---|
| 211 | 211 | /* |
|---|
| 212 | | BEGIN: vhcs_daemon variables |
|---|
| | 212 | BEGIN: ispcp_daemon variables |
|---|
| 213 | 213 | */ |
|---|
| 214 | 214 | |
|---|
| … | … | |
| 222 | 222 | |
|---|
| 223 | 223 | /* |
|---|
| 224 | | END: vhcs_daemon variables |
|---|
| | 224 | END: ispcp_daemon variables |
|---|
| 225 | 225 | */ |
|---|
| 226 | 226 | |
|---|
| r449 |
r469 |
|
| 77 | 77 | memset (fname2, 0, sizeof (fname2)); |
|---|
| 78 | 78 | if (readlink (fname1, fname2, sizeof (fname2)) > 0) { |
|---|
| 79 | | strncpy(daemon_path, fname2, strlen(fname2)-strlen("daemon/vhcs2_daemon")); |
|---|
| 80 | | strcat(daemon_path, "engine/vhcs2-rqst-mngr"); |
|---|
| | 79 | strncpy(daemon_path, fname2, strlen(fname2)-strlen("daemon/ispcp_daemon")); |
|---|
| | 80 | strcat(daemon_path, "engine/ispcp-rqst-mngr"); |
|---|
| 81 | 81 | |
|---|
| 82 | 82 | fdres = open ( "/dev/null", O_RDONLY ); |
|---|
| … | … | |
| 126 | 126 | else if( dupres != fdres) close (fdres); |
|---|
| 127 | 127 | |
|---|
| 128 | | execl( daemon_path, "vhcs2-rqst-mngr" ,(char*)NULL ); |
|---|
| | 128 | execl( daemon_path, "ispcp-rqst-mngr" ,(char*)NULL ); |
|---|
| 129 | 129 | #endif |
|---|
| 130 | 130 | |
|---|
| r154 |
r469 |
|
| 59 | 59 | #if defined(__OpenBSD__) || defined(__FreeBSD__) |
|---|
| 60 | 60 | |
|---|
| 61 | | #define QUERY_CMD "/var/www/vhcs2/engine/vhcs2-rqst-mngr" |
|---|
| | 61 | #define QUERY_CMD "/var/www/ispcp/engine/ispcp-rqst-mngr" |
|---|
| 62 | 62 | |
|---|
| 63 | 63 | #endif |
|---|
| 64 | 64 | |
|---|
| 65 | | #define LOG_DIR "/var/log/vhcs2" |
|---|
| | 65 | #define LOG_DIR "/var/log/ispcp" |
|---|
| 66 | 66 | |
|---|
| 67 | | #define STDOUT_LOG "vhcs2_daemon-stdout-log" |
|---|
| | 67 | #define STDOUT_LOG "ispcp_daemon-stdout-log" |
|---|
| 68 | 68 | |
|---|
| 69 | | #define STDERR_LOG "vhcs2_daemon-stderr-log" |
|---|
| | 69 | #define STDERR_LOG "ispcp_daemon-stderr-log" |
|---|
| 70 | 70 | |
|---|
| 71 | 71 | extern char *message(int message_number); |
|---|
|