HEX
Server: nginx/1.18.0
System: Linux proba.drlaca.appboxes.co 6.1.0-28-amd64 #1 SMP PREEMPT_DYNAMIC Debian 6.1.119-1 (2024-11-22) x86_64
User: appbox (1000)
PHP: 7.4.3-4ubuntu2.29
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: //etc/my_init.d/20_installer.sh
#!/bin/bash
set -e

echo "Cleaning up locks"
rm /run/mysqld/mysqld.sock.lock || true

if [ ! -f /etc/installer_completed ]; then

echo "**************************************************************"
echo "*                                                            *"
echo "*                 Cylo Base Installer 1.0                    *"
echo "*                     Installing Apps:                       *"
echo "*                                                            *"
echo "**************************************************************"
echo "Default base image applications"
if [ "${INSTALL_NGINXPHP}" = true ]; then echo "Nginx & PHP-FPM 7"; fi
if [ "${INSTALL_MYSQL}" = true ]; then echo "MySQL Server"; fi
if [ "${INSTALL_MONGODB}" = true ]; then echo "MongoDB Server"; fi
echo " "
echo "**************************************************************"
echo " "

    # Create Directories
    echo "Creating default directories"
    mkdir -p /home/appbox/config
    mkdir -p /home/appbox/logs

    if [ "${INSTALL_NGINXPHP}" = true ]; then
        echo "Installing NGINX & PHP-FPM 7"
        /bin/bash /scripts/nginx_php7.sh
        chown -R appbox:appbox /home/appbox/public_html
    else
        echo "Not required, removing installer"
        rm -fr /scripts/nginx_php7.sh
    fi

    if [ "${INSTALL_MYSQL}" = true ]; then
        echo "Installing MySQL"
        /bin/bash /scripts/mysql.sh
        chown -R appbox:appbox /home/appbox/mysql
    else
        echo "Not required, removing installer"
        rm -f /scripts/mysql.sh
    fi

    if [ "${INSTALL_MONGODB}" = true ]; then
        echo "Installing MongoDB"
        /bin/bash /scripts/mongodb.sh
    else
        echo "Not required, removing installer"
        rm -f /scripts/mongodb.sh
    fi

    # Set Permissions
    echo "Setting Permissions on homedir"
    chown -R appbox:appbox /home/appbox/config
    chown -R appbox:appbox /home/appbox/logs

    # Clean Up
    echo "Cleaning up"
    rm -fr /sources

    apt autoremove -y
    apt-get clean
    rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/*

echo "                                   .''.       "
echo "       .''.      .        *''*    :_\/_:     . "
echo "      :_\/_:   _\(/_  .:.*_\/_*   : /\ :  .'.:.'."
echo "  .''.: /\ :   ./)\   ':'* /\ * :  '..'.  -=:o:=-"
echo " :_\/_:'.:::.    ' *''*    * '.\'/.' _\(/_'.':'.'"
echo " : /\ : :::::     *_\/_*     -= o =-  /)\    '  *"
echo "  '..'  ':::'     * /\ *     .'/.\'.   '"
echo "      *            *..*         :"

    echo "Finishing Install"
    # Finish Install
    if [ "${APEX_CALLBACK}" = true ]; then
        until [[ $(curl -i -H "Accept: application/json" -H "Content-Type:application/json" -X POST "https://api.cylo.io/v1/apps/installed/${INSTANCE_ID}" | grep '200') ]]
            do
            sleep 5
        done
    fi
    touch /etc/installer_completed

fi