Changeset 736
- Timestamp:
- 07/31/07 22:07:13
(1 year ago)
- Author:
- raphael
- Message:
Fixed #539: Undefined variable: total_mails
Removed hardcoded path in include/ispcp-lib.php
Re-enabled lock file check
Added status target to ispcp_network
Fixed lock file location
-
Files:
-
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
| r734 |
r736 |
|
| 7 | 7 | | * make sure awstats is called in prerotate | |
|---|
| 8 | 8 | \_________________________________________________________________/ |
|---|
| | 9 | |
|---|
| | 10 | 2007-07-31 Raphael Geissert |
|---|
| | 11 | - GUI: |
|---|
| | 12 | * Fixed #539: Undefined variable: total_mails |
|---|
| | 13 | * Removed hardcoded path in include/ispcp-lib.php |
|---|
| | 14 | * Re-enabled lock file check |
|---|
| | 15 | - CONFIGS: |
|---|
| | 16 | * Added status target to ispcp_network |
|---|
| | 17 | - ENGINE: |
|---|
| | 18 | * Fixed lock file location |
|---|
| 9 | 19 | |
|---|
| 10 | 20 | 2007-07-30 Raphael Geissert |
|---|
| r658 |
r736 |
|
| 43 | 43 | $(SYSTEM_MAKE_DIRS) $(SYSTEM_APACHE_BACK_LOG) |
|---|
| 44 | 44 | |
|---|
| 45 | | cd ./configs && $(MAKE) install |
|---|
| | 45 | cd ./configs && $(MAKE) install & |
|---|
| 46 | 46 | cd ./engine && $(MAKE) install |
|---|
| 47 | 47 | cd ./gui && $(MAKE) install |
|---|
| … | … | |
| 50 | 50 | uninstall: |
|---|
| 51 | 51 | |
|---|
| 52 | | cd ./tools && $(MAKE) uninstall |
|---|
| 53 | | cd ./configs && $(MAKE) uninstall |
|---|
| 54 | | cd ./engine && $(MAKE) uninstall |
|---|
| 55 | | cd ./gui && $(MAKE) uninstall |
|---|
| 56 | | cd ./keys && $(MAKE) uninstall |
|---|
| | 52 | cd ./tools && $(MAKE) uninstall & |
|---|
| | 53 | cd ./configs && $(MAKE) uninstall & |
|---|
| | 54 | cd ./engine && $(MAKE) uninstall & |
|---|
| | 55 | cd ./gui && $(MAKE) uninstall & |
|---|
| | 56 | cd ./keys && $(MAKE) uninstall & |
|---|
| 57 | 57 | |
|---|
| 58 | 58 | rm -rf $(SYSTEM_CONF) |
|---|
| r715 |
r736 |
|
| 6 | 6 | if [ $(HOST_OS) == debian ] ; then \ |
|---|
| 7 | 7 | cp ./ispcp.conf $(SYSTEM_CONF) ; \ |
|---|
| 8 | | (cd ./apache && $(MAKE) install); \ |
|---|
| 9 | | (cd ./awstats && $(MAKE) install); \ |
|---|
| 10 | | (cd ./bind && $(MAKE) install); \ |
|---|
| 11 | | (cd ./cron.d && $(MAKE) install); \ |
|---|
| 12 | | (cd ./database && $(MAKE) install); \ |
|---|
| 13 | | (cd ./fcgi && $(MAKE) install); \ |
|---|
| 14 | | (cd ./init.d && $(MAKE) install); \ |
|---|
| 15 | | (cd ./postfix && $(MAKE) install); \ |
|---|
| 16 | | (cd ./courier && $(MAKE) install); \ |
|---|
| 17 | | (cd ./proftpd && $(MAKE) install); \ |
|---|
| | 8 | (cd ./apache && $(MAKE) install &); \ |
|---|
| | 9 | (cd ./awstats && $(MAKE) install &); \ |
|---|
| | 10 | (cd ./bind && $(MAKE) install &); \ |
|---|
| | 11 | (cd ./cron.d && $(MAKE) install &); \ |
|---|
| | 12 | (cd ./database && $(MAKE) install &); \ |
|---|
| | 13 | (cd ./fcgi && $(MAKE) install &); \ |
|---|
| | 14 | (cd ./init.d && $(MAKE) install &); \ |
|---|
| | 15 | (cd ./postfix && $(MAKE) install &); \ |
|---|
| | 16 | (cd ./courier && $(MAKE) install &); \ |
|---|
| | 17 | (cd ./proftpd && $(MAKE) install &); \ |
|---|
| 18 | 18 | (cd ./logrotate && $(MAKE) install); \ |
|---|
| 19 | 19 | elif [ $(HOST_OS) == fedora ] ; then \ |
|---|
| … | … | |
| 37 | 37 | if [ $(HOST_OS) == debian ] ; then \ |
|---|
| 38 | 38 | rm -rf $(SYSTEM_CONF)/ispcp.conf ; \ |
|---|
| 39 | | (cd ./apache && $(MAKE) uninstall); \ |
|---|
| 40 | | (cd ./awstats && $(MAKE) uninstall); \ |
|---|
| 41 | | (cd ./bind && $(MAKE) uninstall); \ |
|---|
| 42 | | (cd ./cron.d && $(MAKE) uninstall); \ |
|---|
| 43 | | (cd ./database && $(MAKE) uninstall); \ |
|---|
| 44 | | (cd ./init.d && $(MAKE) uninstall); \ |
|---|
| 45 | | (cd ./postfix && $(MAKE) uninstall); \ |
|---|
| 46 | | (cd ./courier && $(MAKE) uninstall); \ |
|---|
| 47 | | (cd ./proftpd && $(MAKE) uninstall); \ |
|---|
| 48 | | (cd ./logrotate && $(MAKE) uninstall); \ |
|---|
| | 39 | (cd ./apache && $(MAKE) uninstall &); \ |
|---|
| | 40 | (cd ./awstats && $(MAKE) uninstall &); \ |
|---|
| | 41 | (cd ./bind && $(MAKE) uninstall &); \ |
|---|
| | 42 | (cd ./cron.d && $(MAKE) uninstall &); \ |
|---|
| | 43 | (cd ./database && $(MAKE) uninstall &); \ |
|---|
| | 44 | (cd ./init.d && $(MAKE) uninstall &); \ |
|---|
| | 45 | (cd ./postfix && $(MAKE) uninstall &); \ |
|---|
| | 46 | (cd ./courier && $(MAKE) uninstall &); \ |
|---|
| | 47 | (cd ./proftpd && $(MAKE) uninstall &); \ |
|---|
| | 48 | (cd ./logrotate && $(MAKE) uninstall &); \ |
|---|
| 49 | 49 | elif [ $(HOST_OS) == fedora ] ; then \ |
|---|
| 50 | 50 | cd ./dists/fedora && $(MAKE) uninstall ; \ |
|---|
| r729 |
r736 |
|
| 204 | 204 | ; |
|---|
| 205 | 205 | |
|---|
| 206 | | open_basedir = "{WWW_DIR}/{DMN_NAME}/:{CONF_DIR}/:/proc/:/bin/df:/bin/mount:/var/log/rkhunter.log:{PEAR_DIR}/" |
|---|
| | 206 | open_basedir = "{WWW_DIR}/{DMN_NAME}/:{CONF_DIR}/:{MR_LOCK_FILE}:/proc/:/bin/df:/bin/mount:/var/log/rkhunter.log:{PEAR_DIR}/" |
|---|
| 207 | 207 | |
|---|
| 208 | 208 | ; This directive allows you to disable certain functions for security reasons. |
|---|
| r729 |
r736 |
|
| 215 | 215 | ; |
|---|
| 216 | 216 | |
|---|
| 217 | | open_basedir = "{WWW_DIR}/{DMN_NAME}/:{CONF_DIR}/:/proc/:/bin/df:/bin/mount:/var/log/rkhunter.log:{PEAR_DIR}/" |
|---|
| | 217 | open_basedir = "{WWW_DIR}/{DMN_NAME}/:{CONF_DIR}/:{MR_LOCK_FILE}:/proc/:/bin/df:/bin/mount:/var/log/rkhunter.log:{PEAR_DIR}/" |
|---|
| 218 | 218 | |
|---|
| 219 | 219 | ; This directive allows you to disable certain functions for security reasons. |
|---|
| r712 |
r736 |
|
| 1 | 1 | #! /bin/sh |
|---|
| | 2 | |
|---|
| | 3 | # ispCP ω (OMEGA) a Virtual Hosting Control System |
|---|
| | 4 | # Copyright (c) 2007 by ispCP |
|---|
| | 5 | # http://www.isp-control.net |
|---|
| 2 | 6 | # |
|---|
| 3 | | # skeleton example file to build /etc/init.d/ scripts. |
|---|
| 4 | | # This file should be used to construct scripts for /etc/init.d. |
|---|
| 5 | 7 | # |
|---|
| 6 | | # Written by Miquel van Smoorenburg <miquels@cistron.nl>. |
|---|
| 7 | | # Modified for Debian GNU/Linux |
|---|
| 8 | | # by Ian Murdock <imurdock@gnu.ai.mit.edu>. |
|---|
| 9 | | # Modified for Debian |
|---|
| 10 | | # by Erik Lehmann <erik.lehmann@ispcp.net> |
|---|
| | 8 | # License: |
|---|
| | 9 | # This program is free software; you can redistribute it and/or |
|---|
| | 10 | # modify it under the terms of the MPL Mozilla Public License |
|---|
| | 11 | # as published by the Free Software Foundation; either version 1.1 |
|---|
| | 12 | # of the License, or (at your option) any later version. |
|---|
| 11 | 13 | # |
|---|
| 12 | | # Version: @(#)skeleton 1.8 03-Mar-1998 miquels@cistron.nl |
|---|
| | 14 | # This program is distributed in the hope that it will be useful, |
|---|
| | 15 | # but WITHOUT ANY WARRANTY; without even the implied warranty of |
|---|
| | 16 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
|---|
| | 17 | # MPL Mozilla Public License for more details. |
|---|
| 13 | 18 | # |
|---|
| 14 | | # This file was automatically customized by dh-make on Mon, 22 Apr 2002 16:15:28 +0300 |
|---|
| | 19 | # You may have received a copy of the MPL Mozilla Public License |
|---|
| | 20 | # along with this program. |
|---|
| | 21 | # |
|---|
| | 22 | # An on-line copy of the MPL Mozilla Public License can be found |
|---|
| | 23 | # http://www.mozilla.org/MPL/MPL-1.1.html |
|---|
| | 24 | # |
|---|
| | 25 | # |
|---|
| | 26 | # The ispCP Home Page is at: |
|---|
| | 27 | # |
|---|
| | 28 | # http://www.isp-control.net |
|---|
| | 29 | |
|---|
| | 30 | set -e |
|---|
| | 31 | |
|---|
| | 32 | # Note: do not modify any of these vars here, use /etc/default/$NAME instead |
|---|
| 15 | 33 | |
|---|
| 16 | 34 | PATH=/sbin:/bin:/usr/sbin:/usr/bin |
|---|
| 17 | | DAEMON=/var/www/ispcp/daemon/ispcp_daemon |
|---|
| 18 | | PID=/var/run/ispcp-daemon.pid |
|---|
| 19 | 35 | NAME=ispcp_daemon |
|---|
| 20 | | DESC=ispcp_daemon |
|---|
| | 36 | DAEMON=/var/www/ispcp/daemon/$NAME |
|---|
| | 37 | PID=/var/run/$NAME.pid |
|---|
| | 38 | DESC="ispCP Daemon" |
|---|
| 21 | 39 | |
|---|
| | 40 | START=1 |
|---|
| 22 | 41 | |
|---|
| 23 | 42 | test -f $DAEMON || exit 0 |
|---|
| 24 | 43 | |
|---|
| 25 | | set -e |
|---|
| | 44 | # Read config file if it is present. |
|---|
| | 45 | if [ -r /etc/default/$NAME ]; then |
|---|
| | 46 | . /etc/default/$NAME |
|---|
| | 47 | fi |
|---|
| | 48 | |
|---|
| | 49 | if [ $START -eq 0 ]; then |
|---|
| | 50 | echo "$DESC: not starting, edit /etc/default/$NAME." |
|---|
| | 51 | exit 0 |
|---|
| | 52 | fi |
|---|
| 26 | 53 | |
|---|
| 27 | 54 | case "$1" in |
|---|
| 28 | 55 | start) |
|---|
| | 56 | echo "Starting $DESC..." |
|---|
| 29 | 57 | start-stop-daemon --start --verbose --exec $DAEMON -- -p $PID |
|---|
| 30 | 58 | ;; |
|---|
| … | … | |
| 36 | 64 | start-stop-daemon --stop --verbose --pidfile $PID --exec $DAEMON --retry 5 |
|---|
| 37 | 65 | rm $PID |
|---|
| | 66 | echo "Starting $DESC..." |
|---|
| 38 | 67 | start-stop-daemon --start --verbose --exec $DAEMON -- -p $PID |
|---|
| 39 | 68 | ;; |
|---|
| 40 | 69 | status) |
|---|
| | 70 | set +e |
|---|
| 41 | 71 | if [ -s $PID ]; then |
|---|
| 42 | 72 | RPID=`cat $PID` |
|---|
| r689 |
r736 |
|
| 1 | 1 | #!/bin/sh |
|---|
| 2 | 2 | |
|---|
| | 3 | # ispCP ω (OMEGA) a Virtual Hosting Control System |
|---|
| | 4 | # Copyright (c) 2007 by ispCP |
|---|
| | 5 | # http://www.isp-control.net |
|---|
| | 6 | # |
|---|
| | 7 | # |
|---|
| | 8 | # License: |
|---|
| | 9 | # This program is free software; you can redistribute it and/or |
|---|
| | 10 | # modify it under the terms of the MPL Mozilla Public License |
|---|
| | 11 | # as published by the Free Software Foundation; either version 1.1 |
|---|
| | 12 | # of the License, or (at your option) any later version. |
|---|
| | 13 | # |
|---|
| | 14 | # This program is distributed in the hope that it will be useful, |
|---|
| | 15 | # but WITHOUT ANY WARRANTY; without even the implied warranty of |
|---|
| | 16 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
|---|
| | 17 | # MPL Mozilla Public License for more details. |
|---|
| | 18 | # |
|---|
| | 19 | # You may have received a copy of the MPL Mozilla Public License |
|---|
| | 20 | # along with this program. |
|---|
| | 21 | # |
|---|
| | 22 | # An on-line copy of the MPL Mozilla Public License can be found |
|---|
| | 23 | # http://www.mozilla.org/MPL/MPL-1.1.html |
|---|
| | 24 | # |
|---|
| | 25 | # |
|---|
| | 26 | # The ispCP Home Page is at: |
|---|
| | 27 | # |
|---|
| | 28 | # http://www.isp-control.net |
|---|
| | 29 | |
|---|
| 3 | 30 | set -e |
|---|
| | 31 | |
|---|
| | 32 | # Note: do not modify any of these vars here, use /etc/default/$NAME instead |
|---|
| 4 | 33 | |
|---|
| 5 | 34 | PATH=/sbin:/bin:/usr/sbin:/usr/bin |
|---|
| 6 | 35 | DESC="ispCP Network Traffic Logger" |
|---|
| 7 | 36 | NAME=ispcp_network |
|---|
| 8 | | |
|---|
| | 37 | LFILE=/var/run/$NAME |
|---|
| 9 | 38 | IPTABLES=/sbin/iptables |
|---|
| 10 | | LOGDIR=/var/log/ispcp |
|---|
| | 39 | LOG_DIR=/var/log/ispcp |
|---|
| 11 | 40 | |
|---|
| 12 | 41 | START=1 |
|---|
| … | … | |
| 24 | 53 | add_rules() |
|---|
| 25 | 54 | { |
|---|
| 26 | | ${IPTABLES} -N ISPCP_INPUT 2>> "${LOGDIR}/ispcp_network.err.log" |
|---|
| 27 | | ${IPTABLES} -N ISPCP_OUTPUT 2>> "${LOGDIR}/ispcp_network.err.log" |
|---|
| 28 | | |
|---|
| | 55 | ${IPTABLES} -N ISPCP_INPUT 2>> "${LOG_DIR}/${NAME}.err.log" |
|---|
| | 56 | ${IPTABLES} -N ISPCP_OUTPUT 2>> "${LOG_DIR}/${NAME}.err.log" |
|---|
| | 57 | |
|---|
| 29 | 58 | # All traffic should jump through ISPCP tables before anything else |
|---|
| 30 | | ${IPTABLES} -I INPUT -j ISPCP_INPUT 2>> "${LOGDIR}/ispcp_network.err.log" |
|---|
| 31 | | ${IPTABLES} -I OUTPUT -j ISPCP_OUTPUT 2>> "${LOGDIR}/ispcp_network.err.log" |
|---|
| 32 | | |
|---|
| | 59 | ${IPTABLES} -I INPUT -j ISPCP_INPUT 2>> "${LOG_DIR}/${NAME}.err.log" |
|---|
| | 60 | ${IPTABLES} -I OUTPUT -j ISPCP_OUTPUT 2>> "${LOG_DIR}/${NAME}.err.log" |
|---|
| | 61 | |
|---|
| 33 | 62 | # web traffic |
|---|
| 34 | | |
|---|
| 35 | | ${IPTABLES} -I ISPCP_INPUT -p tcp --dport 80 2>> "${LOGDIR}/ispcp_network.err.log" |
|---|
| 36 | | ${IPTABLES} -I ISPCP_OUTPUT -p tcp --sport 80 2>> "${LOGDIR}/ispcp_network.err.log" |
|---|
| 37 | | |
|---|
| | 63 | |
|---|
| | 64 | ${IPTABLES} -I ISPCP_INPUT -p tcp --dport 80 2>> "${LOG_DIR}/${NAME}.err.log" |
|---|
| | 65 | ${IPTABLES} -I ISPCP_OUTPUT -p tcp --sport 80 2>> "${LOG_DIR}/${NAME}.err.log" |
|---|
| | 66 | |
|---|
| 38 | 67 | # pop3 traffic |
|---|
| 39 | | |
|---|
| 40 | | ${IPTABLES} -I ISPCP_INPUT -p tcp --dport 110 2>> "${LOGDIR}/ispcp_network.err.log" |
|---|
| 41 | | ${IPTABLES} -I ISPCP_OUTPUT -p tcp --sport 110 2>> "${LOGDIR}/ispcp_network.err.log" |
|---|
| 42 | | |
|---|
| | 68 | |
|---|
| | 69 | ${IPTABLES} -I ISPCP_INPUT -p tcp --dport 110 2>> "${LOG_DIR}/${NAME}.err.log" |
|---|
| | 70 | ${IPTABLES} -I ISPCP_OUTPUT -p tcp --sport 110 2>> "${LOG_DIR}/${NAME}.err.log" |
|---|
| | 71 | |
|---|
| 43 | 72 | # imap traffic |
|---|
| 44 | | |
|---|
| 45 | | ${IPTABLES} -I ISPCP_INPUT -p tcp --dport 143 2>> "${LOGDIR}/ispcp_network.err.log" |
|---|
| 46 | | ${IPTABLES} -I ISPCP_OUTPUT -p tcp --sport 143 2>> "${LOGDIR}/ispcp_network.err.log" |
|---|
| 47 | | |
|---|
| | 73 | |
|---|
| | 74 | ${IPTABLES} -I ISPCP_INPUT -p tcp --dport 143 2>> "${LOG_DIR}/${NAME}.err.log" |
|---|
| | 75 | ${IPTABLES} -I ISPCP_OUTPUT -p tcp --sport 143 2>> "${LOG_DIR}/${NAME}.err.log" |
|---|
| | 76 | |
|---|
| 48 | 77 | # mail traffic |
|---|
| 49 | | |
|---|
| 50 | | ${IPTABLES} -I ISPCP_INPUT -p tcp --dport 25 2>> "${LOGDIR}/ispcp_network.err.log" |
|---|
| 51 | | ${IPTABLES} -I ISPCP_OUTPUT -p tcp --sport 25 2>> "${LOGDIR}/ispcp_network.err.log" |
|---|
| | 78 | |
|---|
| | 79 | ${IPTABLES} -I ISPCP_INPUT -p tcp --dport 25 2>> "${LOG_DIR}/${NAME}.err.log" |
|---|
| | 80 | ${IPTABLES} -I ISPCP_OUTPUT -p tcp --sport 25 2>> "${LOG_DIR}/${NAME}.err.log" |
|---|
| 52 | 81 | |
|---|
| 53 | 82 | # Explicit return once done |
|---|
| 54 | 83 | ${IPTABLES} -A ISPCP_INPUT -j RETURN |
|---|
| 55 | 84 | ${IPTABLES} -A ISPCP_OUTPUT -j RETURN |
|---|
| | 85 | |
|---|
| | 86 | # Touch lock file |
|---|
| | 87 | touch $LFILE |
|---|
| 56 | 88 | } |
|---|
| 57 | 89 | |
|---|
| 58 | 90 | remove_rules() |
|---|
| 59 | 91 | { |
|---|
| 60 | | ${IPTABLES} -D INPUT -j ISPCP_INPUT 2>> "${LOGDIR}/ispcp_network.err.log" |
|---|
| 61 | | ${IPTABLES} -D OUTPUT -j ISPCP_OUTPUT 2>> "${LOGDIR}/ispcp_network.err.log" |
|---|
| 62 | | ${IPTABLES} -F ISPCP_INPUT 2>> "${LOGDIR}/ispcp_network.err.log" |
|---|
| 63 | | ${IPTABLES} -F ISPCP_OUTPUT 2>> "${LOGDIR}/ispcp_network.err.log" |
|---|
| 64 | | ${IPTABLES} -X ISPCP_INPUT 2>> "${LOGDIR}/ispcp_network.err.log" |
|---|
| 65 | | ${IPTABLES} -X ISPCP_OUTPUT 2>> "${LOGDIR}/ispcp_network.err.log" |
|---|
| | 92 | ${IPTABLES} -D INPUT -j ISPCP_INPUT 2>> "${LOG_DIR}/${NAME}.err.log" |
|---|
| | 93 | ${IPTABLES} -D OUTPUT -j ISPCP_OUTPUT 2>> "${LOG_DIR}/${NAME}.err.log" |
|---|
| | 94 | ${IPTABLES} -F ISPCP_INPUT 2>> "${LOG_DIR}/${NAME}.err.log" |
|---|
| | 95 | ${IPTABLES} -F ISPCP_OUTPUT 2>> "${LOG_DIR}/${NAME}.err.log" |
|---|
| | 96 | ${IPTABLES} -X ISPCP_INPUT 2>> "${LOG_DIR}/${NAME}.err.log" |
|---|
| | 97 | ${IPTABLES} -X ISPCP_OUTPUT 2>> "${LOG_DIR}/${NAME}.err.log" |
|---|
| | 98 | |
|---|
| | 99 | # Remove lock file |
|---|
| | 100 | rm $LFILE |
|---|
| 66 | 101 | } |
|---|
| 67 | 102 | |
|---|
| … | … | |
| 69 | 104 | start) |
|---|
| 70 | 105 | echo -n "Starting $DESC:" |
|---|
| | 106 | if [ -e $LFILE ]; then |
|---|
| | 107 | echo " ${NAME} is already started" >&2 |
|---|
| | 108 | exit 1 |
|---|
| | 109 | fi |
|---|
| 71 | 110 | add_rules |
|---|
| 72 | 111 | echo " $NAME." |
|---|
| … | … | |
| 74 | 113 | stop) |
|---|
| 75 | 114 | echo -n "Stopping $DESC:" |
|---|
| | 115 | if [ ! -e $LFILE ]; then |
|---|
| | 116 | echo "${NAME} is already stopped" >&2 |
|---|
| | 117 | exit 1 |
|---|
| | 118 | fi |
|---|
| 76 | 119 | remove_rules |
|---|
| 77 | 120 | echo " $NAME." |
|---|
| … | … | |
| 79 | 122 | restart|force-reload) |
|---|
| 80 | 123 | echo -n "Restarting $DESC:" |
|---|
| 81 | | remove_rules |
|---|
| 82 | | sleep 2 |
|---|
| | 124 | if [ ! -e $LFILE ]; then |
|---|
| | 125 | echo "${NAME} is already stopped" >&2 |
|---|
| | 126 | else |
|---|
| | 127 | remove_rules |
|---|
| | 128 | sleep 2 |
|---|
| | 129 | fi |
|---|
| 83 | 130 | add_rules |
|---|
| 84 | 131 | echo " $NAME." |
|---|
| | 132 | ;; |
|---|
| | 133 | status) |
|---|
| | 134 | if [ ! -e $LFILE ]; then |
|---|
| | 135 | echo "${NAME} is stopped" |
|---|
| | 136 | else |
|---|
| | 137 | echo "${NAME} is started" |
|---|
| | 138 | exit 0 |
|---|
| | 139 | fi |
|---|
| 85 | 140 | ;; |
|---|
| 86 | 141 | *) |
|---|
| … | … | |
| 91 | 146 | |
|---|
| 92 | 147 | exit 0 |
|---|
| 93 | | |
|---|
| r729 |
r736 |
|
| 23 | 23 | BASE_SERVER_VHOST = |
|---|
| 24 | 24 | |
|---|
| 25 | | MR_LOCK_FILE = /tmp/ispcp.lock |
|---|
| | 25 | MR_LOCK_FILE = /var/run/ispcp.lock |
|---|
| 26 | 26 | |
|---|
| 27 | 27 | # |
|---|
| … | … | |
| 81 | 81 | # |
|---|
| 82 | 82 | |
|---|
| | 83 | # Don't change this one |
|---|
| 83 | 84 | DATABASE_TYPE = mysql |
|---|
| 84 | 85 | |
|---|
| … | … | |
| 93 | 94 | DATABASE_DIR = /var/lib/mysql |
|---|
| 94 | 95 | |
|---|
| | 96 | CMD_MYSQLDUMP = /usr/bin/mysqldump |
|---|
| | 97 | |
|---|
| 95 | 98 | # |
|---|
| 96 | 99 | # Main variables |
|---|
| … | … | |
| 138 | 141 | # AWSTATS data |
|---|
| 139 | 142 | # |
|---|
| | 143 | |
|---|
| 140 | 144 | AWSTATS_ACTIVE = no |
|---|
| 141 | 145 | |
|---|
| … | … | |
| 368 | 372 | |
|---|
| 369 | 373 | ### Deprecated ### |
|---|
| | 374 | ## Note: these settings are not used by default |
|---|
| 370 | 375 | ## ToDo: Config it by MySQL via Interface! |
|---|
| 371 | 376 | ### |
|---|
| r713 |
r736 |
|
| 290 | 290 | if ($dbuser && $dbpass) { |
|---|
| 291 | 291 | my $db_backup_file = "$dmn_backup_dir/$db_name.sql"; |
|---|
| 292 | | my $db_backupcmd = "mysqldump --add-drop-table -u\'$dbuser\' -p\'$dbpass\' \'$db_name\' >\'$db_backup_file\'"; |
|---|
| | 292 | my $db_backupcmd = "$main::cfg{'CMD_MYSQLDUMP'} --add-drop-table -u\'$dbuser\' -p\'$dbpass\' \'$db_name\' >\'$db_backup_file\'"; |
|---|
| 293 | 293 | my $db_compresscmd = "$main::cfg{'CMD_BZIP'} --force \'$db_backup_file\'"; |
|---|
| 294 | 294 | $rs = sys_command($db_backupcmd); |
|---|
| … | … | |
| 324 | 324 | } else { |
|---|
| 325 | 325 | if ( -e "$dmn_dir/$backup_filename" ) { |
|---|
| 326 | | |
|---|
| | 326 | |
|---|
| 327 | 327 | $rs = del_file("$dmn_dir/$backup_filename"); |
|---|
| 328 | 328 | return $rs if ($rs != 0); |
|---|
| 329 | | |
|---|
| | 329 | |
|---|
| 330 | 330 | } |
|---|
| 331 | 331 | } |
|---|
| r675 |
r736 |
|
| 42 | 42 | |
|---|
| 43 | 43 | return $rs if ($rs != 0); |
|---|
| | 44 | |
|---|
| | 45 | $main::lock_file = $main::cfg{'MR_LOCK_FILE'}; |
|---|
| 44 | 46 | |
|---|
| 45 | 47 | $main::log_dir = $main::cfg{'LOG_DIR'}; |
|---|
| r719 |
r736 |
|
| 1438 | 1438 | } |
|---|
| 1439 | 1439 | |
|---|
| 1440 | | $main::lock_file = '/tmp/ispcp.lock'; |
|---|
| 1441 | | |
|---|
| 1442 | 1440 | sub lock_system { |
|---|
| 1443 | 1441 | |
|---|
| r734 |
r736 |
|
| 1858 | 1858 | '{MAIL_DMN}' => $main::cfg{'BASE_SERVER_VHOST'}, |
|---|
| 1859 | 1859 | '{CONF_DIR}' => $main::cfg{'CONF_DIR'}, |
|---|
| | 1860 | '{MR_LOCK_FILE}' => $main::cfg{'MR_LOCK_FILE'}, |
|---|
| 1860 | 1861 | '{PEAR_DIR}' => $main::cfg{'PEAR_DIR'} |
|---|
| 1861 | 1862 | ); |
|---|
| … | … | |
| 1877 | 1878 | '{MAIL_DMN}' => $main::cfg{'BASE_SERVER_VHOST'}, |
|---|
| 1878 | 1879 | '{CONF_DIR}' => $main::cfg{'CONF_DIR'}, |
|---|
| | 1880 | '{MR_LOCK_FILE}' => $main::cfg{'MR_LOCK_FILE'}, |
|---|
| 1879 | 1881 | '{PEAR_DIR}' => $main::cfg{'PEAR_DIR'} |
|---|
| 1880 | 1882 | ); |
|---|
| r730 |
r736 |
|
| 24 | 24 | check_login(__FILE__); |
|---|
| 25 | 25 | |
|---|
| 26 | | global $cfg; |
|---|
| 27 | 26 | $theme_color = $cfg['USER_INITIAL_THEME']; |
|---|
| 28 | 27 | |
|---|
| … | … | |
| 210 | 209 | gen_server_trafic($tpl, $sql); |
|---|
| 211 | 210 | |
|---|
| | 211 | gen_page_message($tpl); |
|---|
| | 212 | |
|---|
| 212 | 213 | $tpl -> parse('PAGE', 'page'); |
|---|
| 213 | 214 | |
|---|
| r731 |
r736 |
|
| 294 | 294 | gen_page_catchall_list($tpl, $sql, $dmn_id, $dmn_name); |
|---|
| 295 | 295 | // gen_page_ftp_list($tpl, $sql, $dmn_id, $dmn_name); |
|---|
| 296 | | return $total_mails; |
|---|
| 297 | 296 | } |
|---|
| 298 | 297 | |
|---|
| … | … | |
| 304 | 303 | array('TR_CLIENT_MANAGE_USERS_PAGE_TITLE' => tr('ISPCP - Client/Manage Users'), |
|---|
| 305 | 304 | 'THEME_COLOR_PATH' => "../themes/$theme_color", |
|---|
| 306 | | 'THEME_CHARSET' => tr('encoding'), |
|---|
| | 305 | 'THEME_CHARSET' => tr('encoding'), |
|---|
| 307 | 306 | 'ISPCP_LICENSE' => $cfg['ISPCP_LICENSE'], |
|---|
| 308 | 307 | 'ISP_LOGO' => get_logo($_SESSION['user_id']) |
|---|
| r730 |
r736 |
|
| 107 | 107 | $rs = exec_query($sql, $query, array($item_id, $item_id, $ok_status)); |
|---|
| 108 | 108 | if ($rs -> RecordCount() == 0) { |
|---|
| 109 | | $tpl -> parse('MAIL_LIST', ''); |
|---|
| 110 | | $tpl -> assign(array('NORMAL_MAIL' => 'disabled', 'FORWARD_MAIL' => 'selected')); |
|---|
| | 109 | $tpl -> assign(array('NORMAL_MAIL' => 'disabled', 'FORWARD_MAIL' => 'selected', 'MAIL_LIST' => '')); |
|---|
| 111 | 110 | } else { |
|---|
| 112 | 111 | |
|---|
| … | … | |
| 150 | 149 | |
|---|
| 151 | 150 | if ($rs -> RecordCount() == 0) { |
|---|
| 152 | | $tpl -> parse('MAIL_LIST', ''); |
|---|
| 153 | | $tpl -> assign(array('NORMAL_MAIL' => 'disabled', 'FORWARD_MAIL' => 'selected')); |
|---|
| | 151 | $tpl -> assign(array('NORMAL_MAIL' => 'disabled', 'FORWARD_MAIL' => 'selected', 'MAIL_LIST' => '')); |
|---|
| 154 | 152 | } else { |
|---|
| 155 | 153 | |
|---|
| … | … | |
| 200 | 198 | |
|---|
| 201 | 199 | if ($rs -> RecordCount() == 0) { |
|---|
| 202 | | $tpl -> parse('MAIL_LIST', ''); |
|---|
| 203 | | $tpl -> assign(array('NORMAL_MAIL' => 'disabled', 'FORWARD_MAIL' => 'selected')); |
|---|
| | 200 | $tpl -> assign(array('NORMAL_MAIL' => 'disabled', 'FORWARD_MAIL' => 'selected', 'MAIL_LIST' => '')); |
|---|
| 204 | 201 | } else { |
|---|
| 205 | 202 | |
|---|
| … | … | |
| 240 | 237 | |
|---|
| 241 | 238 | global $cfg; |
|---|
| 242 | | |
|---|
| | 239 | $match = array(); |
|---|
| 243 | 240 | if (isset($_POST['uaction']) && $_POST['uaction'] === 'create_catchall' && $_POST['mail_type'] === 'normal') { |
|---|
| 244 | 241 | if (preg_match("/(\d+);(dmn|als|sub)/", $id, $match) == 1) { |
|---|
| … | … | |
| 367 | 364 | $tpl -> assign(array('TR_CLIENT_CREATE_CATCHALL_PAGE_TITLE' => tr('ISPCP - Client/Create CatchAll Mail Account'), |
|---|
| 368 | 365 | 'THEME_COLOR_PATH' => "../themes/$theme_color", |
|---|
| 369 | | 'THEME_CHARSET' => tr('encoding'), |
|---|
| | 366 | 'THEME_CHARSET' => tr('encoding'), |
|---|
| 370 | 367 | 'ISPCP_LICENSE' => $cfg['ISPCP_LICENSE'], |
|---|
| 371 | 368 | 'ISP_LOGO' => get_logo($_SESSION['user_id']))); |
|---|
| r730 |
r736 |
|
| 344 | 344 | ); |
|---|
| 345 | 345 | |
|---|
| | 346 | gen_page_message($tpl); |
|---|
| | 347 | |
|---|
| 346 | 348 | $tpl->parse('PAGE', 'page'); |
|---|
| 347 | 349 | |
|---|
| r732 |
r736 |
|
| 18 | 18 | **/ |
|---|
| 19 | 19 | |
|---|
| 20 | | function check_for_lock_file() { |
|---|
| 21 | | // This function is useless right now |
|---|
| 22 | | //The daemon/engine never sets such lock file |
|---|
| 23 | | return ; |
|---|
| | 20 | function check_for_lock_file($wait_lock_timeout = 500000) { |
|---|
| 24 | 21 | |
|---|
| 25 | 22 | global $cfg; |
|---|
| 26 | 23 | |
|---|
| 27 | | $wait_lock_timeout = 500000; |
|---|
| 28 | | |
|---|
| 29 | | $lock_file_name = $cfg['MR_LOCK_FILE']; |
|---|
| 30 | | |
|---|
| 31 | 24 | set_time_limit(0); |
|---|
| 32 | | while(file_exists($lock_file_name)) { |
|---|
| | 25 | while(file_exists($cfg['MR_LOCK_FILE'])) { |
|---|
| 33 | 26 | |
|---|
| 34 | 27 | usleep($wait_lock_timeout); |
|---|
| r730 |
r736 |
|
| 116 | 116 | |
|---|
| 117 | 117 | // The virtual host file from Apache which contains our virtual host entries |
|---|
| 118 | | $cfg['SERVER_VHOST_FILE'] = '/etc/apache2/sites-available/ispcp.conf'; |
|---|
| | 118 | $cfg['SERVER_VHOST_FILE'] = $cfg['APACHE_SITES_DIR'] . '/ispcp.conf'; |
|---|
| 119 | 119 | |
|---|
| 120 | 120 | require_once(INCLUDEPATH.'/spGzip.php'); |
|---|
| r682 |
r736 |
|
| 124 | 124 | if (isset($_POST['Submit']) && isset($_POST['uaction']) && ('save_changes' === $_POST['uaction'])) { |
|---|
| 125 | 125 | // Process data |
|---|
| 126 | | global $dmn_user_name; |
|---|
| 127 | 126 | |
|---|
| 128 | 127 | if (isset($_SESSION['edit_ID'])) { |
|---|
| … | … | |
| 406 | 405 | |
|---|
| 407 | 406 | $admin_login = $_SESSION['user_logged']; |
|---|
| 408 | | write_log("$admin_login change data/password for $dmn_user_name!"); |
|---|
| | 407 | write_log("$admin_login changed data/password for $dmn_user_name!"); |
|---|
| 409 | 408 | |
|---|
| 410 | 409 | if (isset($_POST['send_data']) && !empty($inpass)) { |
|---|
| r730 |
r736 |
|
| 387 | 387 | // |
|---|
| 388 | 388 | |
|---|
| 389 | | // gen_page_message($tpl); |
|---|
| | 389 | gen_page_message($tpl); |
|---|
| 390 | 390 | |
|---|
| 391 | 391 | $tpl -> assign('LAYOUT', ''); |
|---|
| r730 |
r736 |
|
| 41 | 41 | <td><!-- BDP: props_list --> |
|---|
| 42 | 42 | <table width="100%" cellpadding="5" cellspacing="5"> |
|---|
| | 43 | <!-- BDP: page_message --> |
|---|
| | 44 | <tr> |
|---|
| | 45 | <td> </td> |
|---|
| | 46 | <td colspan="2" class=title><font color="#FF0000">{MESSAGE}</font></td> |
|---|
| | 47 | </tr> |
|---|
| | 48 | <!-- EDP: page_message --> |
|---|
| 43 | 49 | <tr> |
|---|
| 44 | 50 | <td width="25"> </td> |
|---|
| r729 |
r736 |
|
| 102 | 102 | </tr> |
|---|
| 103 | 103 | <!-- EDP: page_message --> |
|---|
| | 104 | <!-- BDP: mail_list --> |
|---|
| 104 | 105 | <tr> |
|---|
| 105 | 106 | <td nowrap class="content2" width="200"><input type="radio" name="mail_type" value="normal" {NORMAL_MAIL} onClick="changeType('normal');"> |
|---|
| 106 | 107 | {TR_MAIL_LIST} </td> |
|---|
| 107 | 108 | <td nowrap class="content"><select name="mail_id"> |
|---|
| 108 | | <!-- BDP: mail_list --> |
|---|
| 109 | 109 | <option value="{MAIL_ID};{MAIL_ACCOUNT_PUNNY};">{MAIL_ACCOUNT}</option> |
|---|
| 110 | | <!-- EDP: mail_list --> |
|---|
| 111 | 110 | </select> |
|---|
| 112 | 111 | </td> |
|---|
| 113 | 112 | </tr> |
|---|
| | 113 | <!-- EDP: mail_list --> |
|---|
| 114 | 114 | <tr> |
|---|
| 115 | 115 | <td nowrap class="content2" colspan="2"><input type="radio" name="mail_type" value="forward" {FORWARD_MAIL} onClick="changeType('forward');"> |
|---|
| r730 |
r736 |
|
| 47 | 47 | <td><!-- BDP: props_list --> |
|---|
| 48 | 48 | <table width="100%" cellspacing="7"> |
|---|
| | 49 | <!-- BDP: page_message --> |
|---|
| | 50 | <tr> |
|---|
| | 51 | <td> </td> |
|---|
| | 52 | <td colspan="2" class=title><font color="#FF0000">{MESSAGE}</font></td> |
|---|
| | 53 | </tr> |
|---|
| | 54 | <!-- EDP: page_message --> |
|---|
| 49 | 55 | <tr> |
|---|
| 50 | 56 | <td width="25"> </td> |
|---|
| r730 |
r736 |
|
| 47 | 47 | <td><!-- BDP: props_list --> |
|---|
| 48 | 48 | <table width="100%" cellspacing="7"> |
|---|
| | 49 | <!-- BDP: page_message --> |
|---|
| | 50 | <tr> |
|---|
| | 51 | <td> </td> |
|---|
| | 52 | <td colspan="2" class=title><font color="#FF0000">{MESSAGE}</font></td> |
|---|
| | 53 | </tr> |
|---|
| | 54 | <!-- EDP: page_message --> |
|---|
| 49 | 55 | <tr> |
|---|
| 50 | 56 | <td width="25"> </td> |
|---|
| r659 |
r736 |
|
| 2 | 2 | .include <../Makefile.inc> |
|---|
| 3 | 3 | |
|---|
| 4 | | install: |
|---|
| 5 | | perl rpl.pl $(SYSTEM_ROOT)/gui/include/ispcp-db-keys.php $(SYSTEM_ROOT)/engine/ispcp-db-keys.pl $(SYSTEM_ROOT)/engine/messager/ispcp-db-keys.pl |
|---|
| | 4 | FILES = $(SYSTEM_ROOT)/gui/include/ispcp-db-keys.php $(SYSTEM_ROOT)/engine/ispcp-db-keys.pl $(SYSTEM_ROOT)/engine/messager/ispcp-db-keys.pl |
|---|
| | 5 | |
|---|
| | 6 | install: $(FILES) |
|---|
| | 7 | perl rpl.pl $(FILES) |
|---|
| 6 | 8 | |
|---|
| 7 | 9 | uninstall: |
|---|
| r659 |
r736 |
|
| 2 | 2 | export |
|---|
| 3 | 3 | |
|---|
| 4 | | install: |
|---|
| 5 | | perl rpl.pl $(SYSTEM_ROOT)/gui/include/ispcp-db-keys.php $(SYSTEM_ROOT)/engine/ispcp-db-keys.pl $(SYSTEM_ROOT)/engine/messager/ispcp-db-keys.pl |
|---|
| | 4 | FILES = $(SYSTEM_ROOT)/gui/include/ispcp-db-keys.php $(SYSTEM_ROOT)/engine/ispcp-db-keys.pl $(SYSTEM_ROOT)/engine/messager/ispcp-db-keys.pl |
|---|
| | 5 | |
|---|
| | 6 | install: $(FILES) |
|---|
| | 7 | perl rpl.pl $(FILES) |
|---|
| 6 | 8 | |
|---|
| 7 | 9 | uninstall: |
|---|
| r712 |
r736 |
|
| 2 | 2 | # Copyright (c) 2001-2004 by moleSoftware GmbH |
|---|
| 3 | 3 | # http://www.molesoftware.com |
|---|
| | 4 | # Copyright (c) 2007 by ispCP |
|---|
| | 5 | # http://isp-control.net |
|---|
| 4 | 6 | # |
|---|
| 5 | 7 | # |
|---|
| … | … | |
| 7 | 9 | # This program is free software; you can redistribute it and/or |
|---|
| 8 | 10 | # modify it under the terms of the MPL Mozilla Public License |
|---|
| 9 | | # as published by the Free Software Foundation; either version 1.1 |
|---|
| | 11 | # as published by the Free Software Foundation; either version 1.1 |
|---|
| 10 | 12 | # of the License, or (at your option) any later version. |
|---|
| 11 | 13 | # |
|---|
| 12 | 14 | # This program is distributed in the hope that it will be useful, |
|---|
| 13 | 15 | # but WITHOUT ANY WARRANTY; without even the implied warranty of |
|---|
| 14 | | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
|---|
| | 16 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
|---|
| 15 | 17 | # MPL Mozilla Public License for more details. |
|---|
| 16 | | # |
|---|
| | 18 | # |
|---|
| 17 | 19 | # You may have received a copy of the MPL Mozilla Public License |
|---|
| 18 | 20 | # along with this program. |
|---|
| 19 | | # |
|---|
| | 21 | # |
|---|
| 20 | 22 | # An on-line copy of the MPL Mozilla Public License can be found |
|---|
| 21 | 23 | # http://www.mozilla.org/MPL/MPL-1.1.html |
|---|
| … | … | |
| 40 | 42 | $(BUILD) ispcp_daemon $(OBJS) |
|---|
| 41 | 43 | $(STRIP) ispcp_daemon |
|---|
| 42 | | |
|---|
| | 44 | |
|---|
| 43 | 45 | %.o: %.c %.h |
|---|
| 44 | 46 | $(COMPILE) $@ $*.c |
|---|
|