Changeset 1210
- Timestamp:
- 06/14/08 17:59:59
(6 months ago)
- Author:
- rats
- Message:
updated update script
-
Files:
-
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
| r1207 |
r1210 |
|
| 664 | 664 | # |
|---|
| 665 | 665 | |
|---|
| 666 | | my $cfg_dir = "$main::cfg{'CONF_DIR'}/apache"; |
|---|
| 667 | | my $bk_dir = "$cfg_dir/backup"; |
|---|
| | 666 | $cfg_dir = "$main::cfg{'CONF_DIR'}/apache"; |
|---|
| | 667 | $bk_dir = "$cfg_dir/backup"; |
|---|
| 668 | 668 | |
|---|
| 669 | 669 | ($rs, $cfg_tpl) = get_tpl("$cfg_dir/working", 'fastcgi_ispcp.conf'); |
|---|
| 670 | 670 | return $rs if ($rs != 0); |
|---|
| 671 | 671 | |
|---|
| 672 | | my %tag_hash = ( |
|---|
| | 672 | %tag_hash = ( |
|---|
| 673 | 673 | '{APACHE_SUEXEC_MIN_UID}' => $main::cfg{'APACHE_SUEXEC_MIN_UID'}, |
|---|
| 674 | 674 | '{APACHE_SUEXEC_MIN_GID}' => $main::cfg{'APACHE_SUEXEC_MIN_GID'}, |
|---|
| … | … | |
| 713 | 713 | } |
|---|
| 714 | 714 | |
|---|
| 715 | | sub search_and_replace() { |
|---|
| | 715 | sub search_and_replace { |
|---|
| 716 | 716 | my $dir = shift; |
|---|
| | 717 | my ($cmd, $rs) = (undef, undef); |
|---|
| | 718 | |
|---|
| 717 | 719 | if (opendir(DIRH, "$dir")) { |
|---|
| 718 | 720 | foreach (readdir(DIRH)) { |
|---|
| … | … | |
| 720 | 722 | next if ($_ eq "." || $_ eq ".."); |
|---|
| 721 | 723 | if (/$ARGV[0]/io) { |
|---|
| 722 | | $cmd = '$main::cfg{'CMD_SED} -i -e "s/\/phptmp\"/\/phptmp\//\"" php.ini'; |
|---|
| | 724 | my $sed = $main::cfg{'CMD_SED'}; |
|---|
| | 725 | $cmd = '$sed -i -e "s/\/phptmp\"/\/phptmp\//\"" php.ini'; |
|---|
| 723 | 726 | $rs = sys_command($cmd); |
|---|
| 724 | 727 | return $rs if ($rs != 0); |
|---|
| … | … | |
| 869 | 872 | } |
|---|
| 870 | 873 | |
|---|
| 871 | | sub patch_ispcp_rc3() { |
|---|
| | 874 | sub patch_ispcp_rc3 { |
|---|
| 872 | 875 | push_el(\@main::el, 'patch_ispcp_rc3()', 'Ending...'); |
|---|
| 873 | 876 | |
|---|
| … | … | |
| 907 | 910 | } |
|---|
| 908 | 911 | |
|---|
| 909 | | sub patch_ispcp_rc4() { |
|---|
| | 912 | sub patch_ispcp_rc4 { |
|---|
| 910 | 913 | push_el(\@main::el, 'patch_ispcp_rc4()', 'Starting...'); |
|---|
| 911 | 914 | |
|---|
| 912 | | $rs = setup_mta(); |
|---|
| | 915 | my $rs = setup_mta(); |
|---|
| 913 | 916 | return 2 if ($rs != 0); |
|---|
| 914 | 917 | |
|---|
| … | … | |
| 917 | 920 | |
|---|
| 918 | 921 | # FastCGI-Security |
|---|
| 919 | | search_and_replace($main::cfg{'PHP_STARTER_DIR'}); |
|---|
| | 922 | search_and_replace("$main::cfg{'PHP_STARTER_DIR'}"); |
|---|
| 920 | 923 | |
|---|
| 921 | 924 | # Update Apache |
|---|
| … | … | |
| 959 | 962 | $rs = remove_vhcs2(); |
|---|
| 960 | 963 | } |
|---|
| 961 | | if ($rs == 0) { |
|---|
| 962 | | $rs = patch_ispcp_rc3(); |
|---|
| 963 | | } |
|---|
| 964 | | if ($rs == 0) { |
|---|
| 965 | | $rs = patch_ispcp_rc4(); |
|---|
| 966 | | } |
|---|
| 967 | 964 | |
|---|
| 968 | 965 | if ($rs != 0) { |
|---|
| 969 | | print STDOUT "\t Update failed!\n"; |
|---|
| | 966 | print STDOUT "\tUpdate failed!\n"; |
|---|
| 970 | 967 | exit_werror("ispCP Update failed."); |
|---|
| 971 | 968 | } |
|---|
|
Download in other formats:
#########################################################################
# Site footer - Contents are automatically inserted after main Trac HTML
?>