Changeset 675
- Timestamp:
- 06/24/07 22:28:48
(1 year ago)
- Author:
- rats
- Message:
serveral changes
-
Files:
-
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
| r619 |
r675 |
|
| 3 | 3 | |
|---|
| 4 | 4 | # Quota |
|---|
| 5 | | 0 23 * * * {QUOTA_ROOT_DIR}/ispcp-dsk-quota &>{LOG_DIR}/ispcp-qsk-quota.log |
|---|
| | 5 | 0 23 * * * {QUOTA_ROOT_DIR}/ispcp-dsk-quota &>{LOG_DIR}/ispcp-qsk-quota.log |
|---|
| 6 | 6 | |
|---|
| 7 | 7 | # Traffic |
|---|
| 8 | | 0,30 * * * * {TRAFF_ROOT_DIR}/ispcp-srv-traff &>{LOG_DIR}/ispcp-srv-traff.log |
|---|
| 9 | | 0,30 * * * * {TRAFF_ROOT_DIR}/ispcp-vrl-traff &>{LOG_DIR}/ispcp-vrl-traff.log |
|---|
| 10 | | 15,45 * * * * {TRAFF_ROOT_DIR}/ispcp-vrl-traff-correction &>{LOG_DIR}/ispcp-vrl-traff-correction.log |
|---|
| 11 | | 30 23 * * * {TOOLS_ROOT_DIR}/ispcp-httpd-logs-mngr &>{LOG_DIR}/ispcp-httpd-logs-mngr.log |
|---|
| | 8 | 0,30 * * * * {TRAFF_ROOT_DIR}/ispcp-srv-traff &>{LOG_DIR}/ispcp-srv-traff.log |
|---|
| | 9 | 0,30 * * * * {TRAFF_ROOT_DIR}/ispcp-vrl-traff &>{LOG_DIR}/ispcp-vrl-traff.log |
|---|
| | 10 | 15,45 * * * * {TRAFF_ROOT_DIR}/ispcp-vrl-traff-correction &>{LOG_DIR}/ispcp-vrl-traff-correction.log |
|---|
| | 11 | 30 23 * * * {TOOLS_ROOT_DIR}/ispcp-httpd-logs-mngr &>{LOG_DIR}/ispcp-httpd-logs-mngr.log |
|---|
| 12 | 12 | |
|---|
| 13 | 13 | # Backup |
|---|
| 14 | | 0 1 * * * {BACKUP_ROOT_DIR}/ispcp-backup-all yes &>{LOG_DIR}/ispcp-backup-all-mngr.log |
|---|
| | 14 | 0 1 * * * {BACKUP_ROOT_DIR}/ispcp-backup-all yes &>{LOG_DIR}/ispcp-backup-all-mngr.log |
|---|
| 15 | 15 | |
|---|
| 16 | 16 | # AWStats |
|---|
| … | … | |
| 18 | 18 | |
|---|
| 19 | 19 | # Rootkit Hunter |
|---|
| 20 | | 0 0,12 * * * rkhunter --createlogfile --cronjob |
|---|
| | 20 | 0 0,12 * * * rkhunter --createlogfile --cronjob |
|---|
| 21 | 21 | |
|---|
| 22 | 22 | # [{DMN_NAME}] backup task START. |
|---|
| r670 |
r675 |
|
| 26 | 26 | # |
|---|
| 27 | 27 | # |
|---|
| 28 | | # The ISPCP ω Home Page is at: |
|---|
| | 28 | # The ispCP ω Home Page is at: |
|---|
| 29 | 29 | # |
|---|
| 30 | 30 | # http://isp-control.net |
|---|
| … | … | |
| 32 | 32 | |
|---|
| 33 | 33 | use strict; |
|---|
| 34 | | |
|---|
| 35 | 34 | use warnings; |
|---|
| 36 | 35 | |
|---|
| 37 | 36 | require 'ispcp_common_methods.pl'; |
|---|
| 38 | | |
|---|
| 39 | 37 | require 'ispcp-db-keys.pl'; |
|---|
| 40 | 38 | |
|---|
| … | … | |
| 120 | 118 | $main::ispcp_dsk_quota_el = "$main::log_dir/ispcp-dsk-quota.el"; |
|---|
| 121 | 119 | |
|---|
| 122 | | |
|---|
| 123 | | $main::level1_license = "S2F10-144BD"; |
|---|
| 124 | | |
|---|
| 125 | | $main::level1_dmn_count = 10; |
|---|
| 126 | | |
|---|
| 127 | | $main::level2_license = "37FD1-ED3DB"; |
|---|
| 128 | | |
|---|
| 129 | | $main::level2_dmn_count = 30; |
|---|
| 130 | | |
|---|
| 131 | | $main::level3_license = "QDA53-HE4CC"; |
|---|
| 132 | | |
|---|
| 133 | | $main::level3_dmn_count = 100; |
|---|
| 134 | | |
|---|
| 135 | | $main::level4_license = "A5F26-AC7DF"; |
|---|
| 136 | | |
|---|
| 137 | | $main::level4_dmn_count = "unlimited"; |
|---|
| 138 | | |
|---|
| 139 | | $main::working_license = $main::level1_license; |
|---|
| 140 | | |
|---|
| 141 | 120 | ######################################################################## |
|---|
| 142 | 121 | |
|---|
| 143 | 122 | return 1; |
|---|
| 144 | | |
|---|
| r674 |
r675 |
|
| 6 | 6 | # Copyright (c) 2006-2007 by isp Control Panel |
|---|
| 7 | 7 | # http://isp-control.net |
|---|
| 8 | | # Copyright (c) 2007 by Raphael Geissert |
|---|
| 9 | 8 | # |
|---|
| 10 | 9 | # |
|---|
| … | … | |
| 27 | 26 | # |
|---|
| 28 | 27 | # |
|---|
| 29 | | # The ISPCP ω Home Page is at: |
|---|
| | 28 | # The ispCP ω Home Page is at: |
|---|
| 30 | 29 | # |
|---|
| 31 | 30 | # http://isp-control.net |
|---|
| … | … | |
| 936 | 935 | |
|---|
| 937 | 936 | } |
|---|
| 938 | | |
|---|
| | 937 | |
|---|
| 939 | 938 | my $rs = open(F, '<', '/dev/random'); |
|---|
| 940 | 939 | |
|---|
| … | … | |
| 944 | 943 | |
|---|
| 945 | 944 | return (-1, ''); |
|---|
| 946 | | |
|---|
| 947 | | } |
|---|
| 948 | | |
|---|
| | 945 | |
|---|
| | 946 | } |
|---|
| | 947 | |
|---|
| 949 | 948 | my ($i, $rdata, $rc, $rci) = (0, undef, undef, undef); |
|---|
| 950 | | |
|---|
| 951 | | while ($i < $len) { |
|---|
| | 949 | |
|---|
| | 950 | while ($i <= $len) { |
|---|
| 952 | 951 | |
|---|
| 953 | 952 | read(F, $rc, 1); |
|---|
| 954 | | |
|---|
| | 953 | |
|---|
| 955 | 954 | $rci = ord($rc); |
|---|
| 956 | | |
|---|
| | 955 | |
|---|
| 957 | 956 | next if ($rci <= 32 || $rci >= 125 || $rci == 92 ); |
|---|
| 958 | | |
|---|
| | 957 | |
|---|
| 959 | 958 | $rdata .= $rc; |
|---|
| 960 | 959 | $rc = undef; |
|---|
| … | … | |
| 962 | 961 | |
|---|
| 963 | 962 | } |
|---|
| 964 | | |
|---|
| | 963 | |
|---|
| 965 | 964 | close(F); |
|---|
| 966 | 965 | |
|---|
| … | … | |
| 1620 | 1619 | |
|---|
| 1621 | 1620 | } |
|---|
| 1622 | | |
|---|
| | 1621 | |
|---|
| 1623 | 1622 | if (length($main::db_pass_key) != 32 || length($main::db_pass_iv) != 8) { |
|---|
| 1624 | 1623 | |
|---|
| … | … | |
| 1663 | 1662 | |
|---|
| 1664 | 1663 | } |
|---|
| 1665 | | |
|---|
| | 1664 | |
|---|
| 1666 | 1665 | if (length($main::db_pass_key) != 32 || length($main::db_pass_iv) != 8) { |
|---|
| 1667 | 1666 | |
|---|
| … | … | |
| 1715 | 1714 | |
|---|
| 1716 | 1715 | ($rs, $main::db_pwd) = decrypt_db_password($main::db_pwd); |
|---|
| 1717 | | |
|---|
| | 1716 | |
|---|
| 1718 | 1717 | # Silently quit |
|---|
| 1719 | 1718 | return 0 if ($rs != 0); |
|---|
| r671 |
r675 |
|
| 1468 | 1468 | sub setup_crontab { |
|---|
| 1469 | 1469 | |
|---|
| 1470 | | my ($rs, $rdata, $awstats) = (undef, undef, undef); |
|---|
| | 1470 | my ($rs, $rdata, $awstats) = (undef, undef, ''); |
|---|
| 1471 | 1471 | |
|---|
| 1472 | 1472 | push_el(\@main::el, 'setup_crontab()', 'Starting...'); |
|---|
| … | … | |
| 1507 | 1507 | |
|---|
| 1508 | 1508 | if ($main::cfg{'AWSTATS_ACTIVE'} eq 'yes') { |
|---|
| 1509 | | $awstats = "15 6 * * * $main::cfg{'ROOT_DIR'}/engine/awstats/awstats_updateall.pl now -awstatsprog=$main::cfg{'AWSTATS_ENGINE_DIR'}/awstats.pl"; |
|---|
| | 1509 | $awstats = "15 6 * * * $main::cfg{'ROOT_DIR'}/engine/awstats/awstats_updateall.pl now -awstatsprog=$main::cfg{'AWSTATS_ENGINE_DIR'}/awstats.pl"; |
|---|
| 1510 | 1510 | } |
|---|
| 1511 | 1511 | else { |
|---|
| … | … | |
| 2882 | 2882 | |
|---|
| 2883 | 2883 | } |
|---|
| 2884 | | |
|---|
| | 2884 | |
|---|
| 2885 | 2885 | if ( ! -e "/etc/init.d/vhcs2_daemon" ) { |
|---|
| 2886 | 2886 | |
|---|
| 2887 | 2887 | sys_command_rs("$main::cfg{'CMD_ISPCPD'} stop &> /tmp/ispcp-setup-services.log"); |
|---|
| 2888 | 2888 | sys_command_rs("$main::cfg{'CMD_ISPCPN'} stop &> /tmp/ispcp-setup-services.log"); |
|---|
| 2889 | | |
|---|
| | 2889 | |
|---|
| 2890 | 2890 | sleep(3); |
|---|
| 2891 | | |
|---|
| | 2891 | |
|---|
| 2892 | 2892 | sys_command_rs("$main::cfg{'CMD_ISPCPD'} start &> /tmp/ispcp-setup-services.log"); |
|---|
| 2893 | 2893 | sys_command_rs("$main::cfg{'CMD_ISPCPN'} start &> /tmp/ispcp-setup-services.log"); |
|---|
| r674 |
r675 |
|
| 1 | 1 | #!/usr/bin/perl |
|---|
| | 2 | |
|---|
| | 3 | # ispCP ω (OMEGA) a Virtual Hosting Control Panel |
|---|
| | 4 | # Copyright (c) 2001-2006 by moleSoftware GmbH |
|---|
| | 5 | # http://www.molesoftware.com |
|---|
| | 6 | # Copyright (c) 2006-2007 by isp Control Panel |
|---|
| | 7 | # http://isp-control.net |
|---|
| | 8 | # |
|---|
| | 9 | # |
|---|
| | 10 | # License: |
|---|
| | 11 | # This program is free software; you can redistribute it and/or |
|---|
| | 12 | # modify it under the terms of the MPL Mozilla Public License |
|---|
| | 13 | # as published by the Free Software Foundation; either version 1.1 |
|---|
| | 14 | # of the License, or (at your option) any later version. |
|---|
| | 15 | # |
|---|
| | 16 | # This program is distributed in the hope that it will be useful, |
|---|
| | 17 | # but WITHOUT ANY WARRANTY; without even the implied warranty of |
|---|
| | 18 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
|---|
| | 19 | # MPL Mozilla Public License for more details. |
|---|
| | 20 | # |
|---|
| | 21 | # You may have received a copy of the MPL Mozilla Public License |
|---|
| | 22 | # along with this program. |
|---|
| | 23 | # |
|---|
| | 24 | # An on-line copy of the MPL Mozilla Public License can be found |
|---|
| | 25 | # http://www.mozilla.org/MPL/MPL-1.1.html |
|---|
| | 26 | # |
|---|
| | 27 | # |
|---|
| | 28 | # The ispCP ω Home Page is at: |
|---|
| | 29 | # |
|---|
| | 30 | # http://isp-control.net |
|---|
| | 31 | # |
|---|
| 2 | 32 | |
|---|
| 3 | 33 | use FindBin; |
|---|
| … | … | |
| 13 | 43 | my ($php_fname, $perl_fname, $perl_fname2) = ($ARGV[0], $ARGV[1], $ARGV[2]); |
|---|
| 14 | 44 | |
|---|
| 15 | | my $key = gen_sys_rand_num(33); |
|---|
| 16 | | my $iv = gen_sys_rand_num(9); |
|---|
| | 45 | my $key = gen_sys_rand_num(32); |
|---|
| | 46 | my $iv = gen_sys_rand_num(8); |
|---|
| 17 | 47 | |
|---|
| 18 | 48 | $key =~ s/'/\\'/gi; |
|---|
|