Current time: 11-25-2024, 07:51 PM Hello There, Guest! (LoginRegister)


Thread Closed 
 
Thread Rating:
  • 0 Votes - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
[ERLEDIGT] User Status auf Pause keine Seite
Author Message
TheCry Away
Member
***

Posts: 851
Joined: Oct 2008
Reputation: 21
Post: #27
RE: [Erledigt] User Status auf Pause keine Seite
Die Datei habe ich jetzt natürlich nicht mehr..
Hier aber die Patchdatei...
Ist auf 1.0.1 erstellt worden...
Code:
--- /ispcp/sicherung/engine/ispcp-dmn-mngr    2009-08-18 17:56:19.000000000 +0200
+++ /var/www/ispcp/engine/ispcp-dmn-mngr    2009-08-18 18:49:27.000000000 +0200
@@ -1660,7 +1660,63 @@
            return $rs if ($rs != 0);
        }
    }
+    
+    # Default disable page template;
+        #
+        # check if htdocs folder not exists
+        if (!(-e "$www_dir/$dmn_name/disabled")) {
+            $rs = make_dir(
+                        "$www_dir/$dmn_name/disabled",
+                        'www-data',
+                        'www-data',
+                    #   $sys_user,
+                    #   $sys_group,
+                        0755
+                );
+            return $rs if ($rs != 0);
+
+            my ($index_tpl, $err_cfg_dir) = (undef, undef);
+            my $vhost = $main::cfg{'BASE_SERVER_VHOST'};
+            $err_cfg_dir = "$main::cfg{'GUI_ROOT_DIR'}/disabled";
+            ($rs, $index_tpl) = get_tpl($err_cfg_dir, 'index.html');
+            return $rs if ($rs != 0);
+
+            my $decoded_dmn_name = idn_to_unicode($dmn_name, 'utf-8');
+            my %tag_hash = (
+                        '{DOMAIN_NAME}' => $decoded_dmn_name,
+                        '{BASE_SERVER_VHOST}' => $vhost
+                );
+            ($rs, $cfg) = prep_tpl(\%tag_hash, $index_tpl);
+            return $rs if ($rs != 0);

+            ($rs, $rdata) = store_file(
+                        "$www_dir/$dmn_name/disabled/index.html",
+                        $cfg,
+                        'www-data',
+                        'www-data',
+                #       $sys_user,
+                #       $sys_group,
+                        0644
+                );
+            return $rs if ($rs != 0);
+            $rs = sys_command("$main::cfg{'CMD_CP'} -rp $root_dir/gui/disabled/images $www_dir/$dmn_name/disabled/");
+            return $rs if ($rs != 0);
+            $rs = setfmode("$www_dir/$dmn_name/disabled/images/", 'www-data', 'www-data', 0755);
+            return $rs if ($rs != 0);
+            $rs = setfmode("$www_dir/$dmn_name/disabled/images/top_left_bg.jpg", 'www-data', 'www-data', 0644);
+            return $rs if ($rs != 0);
+            $rs = setfmode("$www_dir/$dmn_name/disabled/images/top_left.jpg", 'www-data', 'www-data', 0644);
+            return $rs if ($rs != 0);
+            $rs = setfmode("$www_dir/$dmn_name/disabled/images/top_right.jpg", 'www-data', 'www-data', 0644);
+            return $rs if ($rs != 0);
+            $rs = setfmode("$www_dir/$dmn_name/disabled/images/top_bg.jpg", 'www-data', 'www-data', 0644);
+            return $rs if ($rs != 0);
+            $rs = setfmode("$www_dir/$dmn_name/disabled/images/valid_css.jpg", 'www-data', 'www-data', 0644);
+            return $rs if ($rs != 0);
+            $rs = setfmode("$www_dir/$dmn_name/disabled/images/valid_xhtml.jpg", 'www-data', 'www-data', 0644);
+            return $rs if ($rs != 0);
+        }
+    
    #
    # php.ini for the new domain
    #
@@ -3696,15 +3752,20 @@
        return -1;
    }

-    my $dmn_name         = @$dmn_data[1];
-    my $www_dir          = $main::cfg{'APACHE_WWW_DIR'};
-    my $dmn_dir          = "$www_dir/$dmn_name";
-    my $dmn_disabled_dir = "$www_dir/$dmn_name.disabled";
-    my $cmd_mv           = $main::cfg{'CMD_MV'};
-    my $cmd              = "$cmd_mv $dmn_disabled_dir $dmn_dir";
-
+    my $dmn_name                     = @$dmn_data[1];
+    my $www_dir                      = $main::cfg{'APACHE_WWW_DIR'};
+    my $dmn_dir                         = "$www_dir/$dmn_name/htdocs";
+    my $dmn_disabled_dir             = "$www_dir/$dmn_name/htdocs.disabled";
+    my $dmn_disabled_content_dir     = "$www_dir/$dmn_name/disabled";
+    my $cmd_mv                       = $main::cfg{'CMD_MV'};
+    my $cmd                         = "$cmd_mv $dmn_dir $dmn_disabled_content_dir";
+    
    my $rs = sys_command($cmd);
    return $rs if ($rs != 0);
+    
+    $cmd                             = "$cmd_mv $dmn_disabled_dir $dmn_dir";
+    $rs = sys_command($cmd);
+    return $rs if ($rs != 0);

    push_el(\@main::el, 'dmn_enable_data()', 'Ending...');
    return 0;
@@ -3722,16 +3783,21 @@
        return -1;
    }

-    my ($rs, $rdata)     = ('', '');
-    my $dmn_name         = @$dmn_data[1];
-    my $www_dir          = $main::cfg{'APACHE_WWW_DIR'};
-    my $dmn_dir          = "$www_dir/$dmn_name";
-    my $dmn_disabled_dir = "$www_dir/$dmn_name.disabled";
-    my $cmd_mv           = $main::cfg{'CMD_MV'};
-    my $cmd              = "$cmd_mv $dmn_dir $dmn_disabled_dir";
+    my ($rs, $rdata)                     = ('', '');
+    my $dmn_name                         = @$dmn_data[1];
+    my $www_dir                          = $main::cfg{'APACHE_WWW_DIR'};
+    my $dmn_dir                            = "$www_dir/$dmn_name/htdocs";
+    my $dmn_disabled_dir                 = "$www_dir/$dmn_name/htdocs.disabled";
+    my $dmn_disabled_content_dir         = "$www_dir/$dmn_name/disabled";
+    my $cmd_mv                           = $main::cfg{'CMD_MV'};
+    my $cmd                             = "$cmd_mv $dmn_dir $dmn_disabled_dir";

    $rs = sys_command($cmd);
    return $rs if ($rs != 0);
+    
+    $cmd                                 = "$cmd_mv $dmn_disabled_content_dir $dmn_dir";
+    $rs = sys_command($cmd);
+    return $rs if ($rs != 0);

    push_el(\@main::el, 'dmn_disable_data()', 'Ending...');
    return 0;

Denk dran die Datei vorher zu sichern!!!!
10-25-2009 02:12 AM
Find all posts by this user
Thread Closed 


Messages In This Thread
RE: [Erledigt] User Status auf Pause keine Seite - TheCry - 10-25-2009 02:12 AM

Forum Jump:


User(s) browsing this thread: 11 Guest(s)