HEX
HEX
Server: Apache/2.4.29 (Ubuntu)
System: Linux 2amigos-php74 5.4.0-1103-aws #111~18.04.1-Ubuntu SMP Tue May 23 20:04:10 UTC 2023 x86_64
User: squarehillcompany.com (1002)
PHP: 7.4.25
Disabled: pcntl_alarm,pcntl_fork,pcntl_waitpid,pcntl_wait,pcntl_wifexited,pcntl_wifstopped,pcntl_wifsignaled,pcntl_wifcontinued,pcntl_wexitstatus,pcntl_wtermsig,pcntl_wstopsig,pcntl_signal,pcntl_signal_get_handler,pcntl_signal_dispatch,pcntl_get_last_error,pcntl_strerror,pcntl_sigprocmask,pcntl_sigwaitinfo,pcntl_sigtimedwait,pcntl_exec,pcntl_getpriority,pcntl_setpriority,pcntl_async_signals,pcntl_unshare,
Upload Files
File: /var/www/vhosts/app.ett-dev.2amigos.us/cgi-bin/index.php
<?php
define('TOKEN', 'cUQHbqyOkXWi');                        // Token to add as a GitHub or GitLab secret, or as https://www.example.com/?token=secret-token
define('REMOTE_REPOSITORY', 'git@gitlab.com:2amigos/emit.to-panel.git');  // The URL to your repository
define('BRANCH', 'development');                                         // Deploy only if push is made to branch
define('CLEAN', 'NO');                                              // Clean local before pull, YES/NO
define('DIR', '/var/www/vhosts/app.ett-dev.2amigos.us/docroot/');                     // The path to local repository, this must be an absolute path, ending with slash (/)
define('LOGDIR', '/var/www/vhosts/app.ett-dev.2amigos.us/logs/');                     // The path to logs folder, this must be an absolute path, ending with slash (/)
define('GIT', '/usr/bin/git');                                      // The path to the git executable
define('MAX_EXECUTION_TIME', 3600);                                 // Override for PHP's max_execution_time (may need set in php.ini)
define('BEFORE_PULL', DIR . '.git/hooks/pre-deploy');               // A bash script to execute before pulling, with '/bin/bash -xe' shebang
define('AFTER_PULL', DIR . '.git/hooks/post-deploy');               // A bash script to execute after successfully pulling, with '/bin/bash -xe' shebang
define('ALLOWED_IP', array(                                         // IPs allowed to access directly (still need to indicate token for deploy)
    '107.20.185.102',
    '138.201.82.136'
));

if (isset($_SERVER['REMOTE_ADDR']) && in_array($_SERVER['REMOTE_ADDR'], ALLOWED_IP) && isset($_GET['viewlog']) && strtolower($_GET['viewlog']) === 'yes') {
    require_once('taillog.php');
    // show log for ongoing deploy
    $tail = new TailLog(readlink(LOGDIR . 'deploy-last.log'));
    if(isset($_GET['ajax'])) {
        echo $tail->getNewLines($_GET['lastsize'], $_GET['grep'], $_GET['invert']);
        die();
    }

    $tail->generateGUI();
} else {
    require_once('deployer.php');
}