mirror of https://github.com/tteck/Proxmox.git
				
				
				
			(Pelican-Panel) I think it works :)
This commit is contained in:
		
							parent
							
								
									3e0729aef2
								
							
						
					
					
						commit
						51ea6173d4
					
				| 
						 | 
					@ -60,9 +60,9 @@ RELEASE=$(wget -q https://github.com/pelican-dev/panel/releases/latest -O - | gr
 | 
				
			||||||
msg_info "Updating $APP to ${RELEASE}"
 | 
					msg_info "Updating $APP to ${RELEASE}"
 | 
				
			||||||
cd /var/www/pelican
 | 
					cd /var/www/pelican
 | 
				
			||||||
php artisan down
 | 
					php artisan down
 | 
				
			||||||
curl -L https://github.com/pelican-dev/panel/releases/latest/download/panel.tar.gz
 | 
					curl -L https://github.com/pelican-dev/panel/releases/latest/download/panel.tar.gz | sudo tar -xzv
 | 
				
			||||||
$STD tar -xzvf panel.tar.gz
 | 
					 | 
				
			||||||
chmod -R 755 storage/* bootstrap/cache
 | 
					chmod -R 755 storage/* bootstrap/cache
 | 
				
			||||||
 | 
					export COMPOSER_ALLOW_SUPERUSER=1
 | 
				
			||||||
composer install --no-dev --optimize-autoloader
 | 
					composer install --no-dev --optimize-autoloader
 | 
				
			||||||
php artisan view:clear
 | 
					php artisan view:clear
 | 
				
			||||||
php artisan config:clear
 | 
					php artisan config:clear
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -21,9 +21,10 @@ $STD apt-get install -y mc
 | 
				
			||||||
$STD apt-get install -y tar
 | 
					$STD apt-get install -y tar
 | 
				
			||||||
$STD apt-get install -y unzip
 | 
					$STD apt-get install -y unzip
 | 
				
			||||||
$STD apt-get install -y git
 | 
					$STD apt-get install -y git
 | 
				
			||||||
$STD apt-get install -y software-properties-common
 | 
					$STD apt-get install -y gnupg
 | 
				
			||||||
$STD apt-get install -y libapache2-mod-php
 | 
					 | 
				
			||||||
$STD apt-get install -y certbot
 | 
					$STD apt-get install -y certbot
 | 
				
			||||||
 | 
					#$STD apt-get install -y libapache2-mod-php
 | 
				
			||||||
 | 
					#$STD apt-get install -y software-properties-common
 | 
				
			||||||
msg_ok "Installed Dependencies"
 | 
					msg_ok "Installed Dependencies"
 | 
				
			||||||
 | 
					
 | 
				
			||||||
read -r -p "Would you like to install Redis? <y/N> (If you want to use external Redis server select 'N') " prompt
 | 
					read -r -p "Would you like to install Redis? <y/N> (If you want to use external Redis server select 'N') " prompt
 | 
				
			||||||
| 
						 | 
					@ -33,7 +34,6 @@ if [[ ${prompt,,} =~ ^(y|yes)$ ]]; then
 | 
				
			||||||
  echo "deb [signed-by=/usr/share/keyrings/redis-archive-keyring.gpg] https://packages.redis.io/deb $(lsb_release -cs) main" >/etc/apt/sources.list.d/redis.list
 | 
					  echo "deb [signed-by=/usr/share/keyrings/redis-archive-keyring.gpg] https://packages.redis.io/deb $(lsb_release -cs) main" >/etc/apt/sources.list.d/redis.list
 | 
				
			||||||
  $STD apt-get update
 | 
					  $STD apt-get update
 | 
				
			||||||
  $STD apt-get install -y redis
 | 
					  $STD apt-get install -y redis
 | 
				
			||||||
  sed -i 's/^bind .*/bind 0.0.0.0/' /etc/redis/redis.conf
 | 
					 | 
				
			||||||
  systemctl enable -q --now redis-server.service
 | 
					  systemctl enable -q --now redis-server.service
 | 
				
			||||||
  msg_ok "Installed Redis"
 | 
					  msg_ok "Installed Redis"
 | 
				
			||||||
fi
 | 
					fi
 | 
				
			||||||
| 
						 | 
					@ -44,13 +44,12 @@ if [[ ${prompt,,} =~ ^(y|yes)$ ]]; then
 | 
				
			||||||
  $STD bash <(curl -fsSL https://r.mariadb.com/downloads/mariadb_repo_setup)
 | 
					  $STD bash <(curl -fsSL https://r.mariadb.com/downloads/mariadb_repo_setup)
 | 
				
			||||||
  $STD apt-get update
 | 
					  $STD apt-get update
 | 
				
			||||||
  $STD apt-get install -y mariadb-server
 | 
					  $STD apt-get install -y mariadb-server
 | 
				
			||||||
  sed -i 's/^# *\(port *=.*\)/\1/' /etc/mysql/my.cnf
 | 
					 | 
				
			||||||
  sed -i 's/^bind-address/#bind-address/g' /etc/mysql/mariadb.conf.d/50-server.cnf
 | 
					 | 
				
			||||||
  msg_ok "Installed MariaDB"
 | 
					  msg_ok "Installed MariaDB"
 | 
				
			||||||
fi
 | 
					fi
 | 
				
			||||||
 | 
					
 | 
				
			||||||
msg_info "Installing PHP"
 | 
					msg_info "Installing PHP"
 | 
				
			||||||
$STD add-apt-repository ppa:ondrej/php
 | 
					wget -O /etc/apt/trusted.gpg.d/php.gpg https://packages.sury.org/php/apt.gpg
 | 
				
			||||||
 | 
					echo "deb https://packages.sury.org/php/ $(lsb_release -sc) main" | sudo tee /etc/apt/sources.list.d/php.list
 | 
				
			||||||
$STD apt-get update
 | 
					$STD apt-get update
 | 
				
			||||||
$STD apt-get install -y php8.3 php8.3-{gd,mysql,mbstring,bcmath,xml,curl,zip,intl,sqlite3,fpm}
 | 
					$STD apt-get install -y php8.3 php8.3-{gd,mysql,mbstring,bcmath,xml,curl,zip,intl,sqlite3,fpm}
 | 
				
			||||||
msg_ok "Installed PHP"
 | 
					msg_ok "Installed PHP"
 | 
				
			||||||
| 
						 | 
					@ -63,7 +62,7 @@ while true; do
 | 
				
			||||||
  CHOICE=$(
 | 
					  CHOICE=$(
 | 
				
			||||||
    whiptail --backtitle "Proxmox VE Helper Scripts" --title "SUPPORT" --menu "Select option" 11 58 2 \
 | 
					    whiptail --backtitle "Proxmox VE Helper Scripts" --title "SUPPORT" --menu "Select option" 11 58 2 \
 | 
				
			||||||
      "1" "Install Nginx" \
 | 
					      "1" "Install Nginx" \
 | 
				
			||||||
      "2" "Install Apache" 3>&2 2>&1 1>&3
 | 
					      "2" "Install Apache" 3>&1 1>&2 2>&3
 | 
				
			||||||
  )
 | 
					  )
 | 
				
			||||||
  exit_status=$?
 | 
					  exit_status=$?
 | 
				
			||||||
  if [ $exit_status == 1 ]; then
 | 
					  if [ $exit_status == 1 ]; then
 | 
				
			||||||
| 
						 | 
					@ -75,25 +74,26 @@ while true; do
 | 
				
			||||||
  1)
 | 
					  1)
 | 
				
			||||||
    $STD apt-get update
 | 
					    $STD apt-get update
 | 
				
			||||||
    $STD apt-get install -y nginx
 | 
					    $STD apt-get install -y nginx
 | 
				
			||||||
    exit
 | 
					    break
 | 
				
			||||||
    ;;
 | 
					    ;;
 | 
				
			||||||
  2)
 | 
					  2)
 | 
				
			||||||
    $STD apt-get update
 | 
					    $STD apt-get update
 | 
				
			||||||
    $STD apt-get install -y apache2
 | 
					    $STD apt-get install -y apache2
 | 
				
			||||||
    exit
 | 
					    break
 | 
				
			||||||
    ;;
 | 
					    ;;
 | 
				
			||||||
  esac
 | 
					  esac
 | 
				
			||||||
done
 | 
					done
 | 
				
			||||||
 | 
					echo 'TEST'
 | 
				
			||||||
 | 
					
 | 
				
			||||||
msg_info "Downloading Panel"
 | 
					msg_info "Downloading Panel"
 | 
				
			||||||
mkdir -p /var/www/pelican
 | 
					mkdir -p /var/www/pelican
 | 
				
			||||||
cd /var/www/pelican
 | 
					cd /var/www/pelican
 | 
				
			||||||
curl -L https://github.com/pelican-dev/panel/releases/latest/download/panel.tar.gz
 | 
					curl -L https://github.com/pelican-dev/panel/releases/latest/download/panel.tar.gz | sudo tar -xzv
 | 
				
			||||||
$STD tar -xzvf panel.tar.gz
 | 
					 | 
				
			||||||
chmod -R 755 storage/* bootstrap/cache/
 | 
					chmod -R 755 storage/* bootstrap/cache/
 | 
				
			||||||
msg_ok "Downloaded Panel"
 | 
					msg_ok "Downloaded Panel"
 | 
				
			||||||
 | 
					
 | 
				
			||||||
msg_info "Installing Panel"
 | 
					msg_info "Installing Panel"
 | 
				
			||||||
 | 
					export COMPOSER_ALLOW_SUPERUSER=1
 | 
				
			||||||
composer install --no-dev --optimize-autoloader
 | 
					composer install --no-dev --optimize-autoloader
 | 
				
			||||||
php artisan p:environment:setup
 | 
					php artisan p:environment:setup
 | 
				
			||||||
php artisan p:environment:database
 | 
					php artisan p:environment:database
 | 
				
			||||||
| 
						 | 
					@ -110,9 +110,9 @@ echo "* * * * * php /var/www/pelican/artisan schedule:run >> /dev/null 2>&1" >>
 | 
				
			||||||
chown -R www-data:www-data /var/www/pelican/* 
 | 
					chown -R www-data:www-data /var/www/pelican/* 
 | 
				
			||||||
msg_ok "Setup Crontab and Permissions"
 | 
					msg_ok "Setup Crontab and Permissions"
 | 
				
			||||||
 | 
					
 | 
				
			||||||
if FQDN=$(whiptail --backtitle "Proxmox VE Helper Scripts" --inputbox "Set FQDN" 8 58 "panel.example.com" --title "FQDN" 3>&1 1>&2 2>&3); then
 | 
					if FQDN=$(whiptail --backtitle "Proxmox VE Helper Scripts" --inputbox "Set FQDN" 8 58 "pelican.example.com" --title "FQDN" 3>&1 1>&2 2>&3); then
 | 
				
			||||||
  if [ -z "$FQDN" ]; then
 | 
					  if [ -z "$FQDN" ]; then
 | 
				
			||||||
    FQDN="panel.example.com"
 | 
					    FQDN="pelican.example.com"
 | 
				
			||||||
  else
 | 
					  else
 | 
				
			||||||
    FQDN=$(echo ${FQDN,,} | tr -d ' ')
 | 
					    FQDN=$(echo ${FQDN,,} | tr -d ' ')
 | 
				
			||||||
  fi
 | 
					  fi
 | 
				
			||||||
| 
						 | 
					@ -144,13 +144,12 @@ server {
 | 
				
			||||||
    listen 80;
 | 
					    listen 80;
 | 
				
			||||||
    server_name $FQDN;
 | 
					    server_name $FQDN;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					 | 
				
			||||||
    root /var/www/pelican/public;
 | 
					    root /var/www/pelican/public;
 | 
				
			||||||
    index index.html index.htm index.php;
 | 
					    index index.html index.htm index.php;
 | 
				
			||||||
    charset utf-8;
 | 
					    charset utf-8;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    location / {
 | 
					    location / {
 | 
				
			||||||
        try_files $uri $uri/ /index.php?$query_string;
 | 
					        try_files \$uri \$uri/ /index.php?\$query_string;
 | 
				
			||||||
    }
 | 
					    }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    location = /favicon.ico { access_log off; log_not_found off; }
 | 
					    location = /favicon.ico { access_log off; log_not_found off; }
 | 
				
			||||||
| 
						 | 
					@ -171,7 +170,7 @@ server {
 | 
				
			||||||
        fastcgi_index index.php;
 | 
					        fastcgi_index index.php;
 | 
				
			||||||
        include fastcgi_params;
 | 
					        include fastcgi_params;
 | 
				
			||||||
        fastcgi_param PHP_VALUE "upload_max_filesize = 100M \n post_max_size=100M";
 | 
					        fastcgi_param PHP_VALUE "upload_max_filesize = 100M \n post_max_size=100M";
 | 
				
			||||||
        fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
 | 
					        fastcgi_param SCRIPT_FILENAME \$document_root\$fastcgi_script_name;
 | 
				
			||||||
        fastcgi_param HTTP_PROXY "";
 | 
					        fastcgi_param HTTP_PROXY "";
 | 
				
			||||||
        fastcgi_intercept_errors off;
 | 
					        fastcgi_intercept_errors off;
 | 
				
			||||||
        fastcgi_buffer_size 16k;
 | 
					        fastcgi_buffer_size 16k;
 | 
				
			||||||
| 
						 | 
					@ -188,7 +187,7 @@ server {
 | 
				
			||||||
EOF
 | 
					EOF
 | 
				
			||||||
    ln -s /etc/nginx/sites-available/pelican.conf /etc/nginx/sites-enabled/pelican.conf
 | 
					    ln -s /etc/nginx/sites-available/pelican.conf /etc/nginx/sites-enabled/pelican.conf
 | 
				
			||||||
    systemctl restart nginx
 | 
					    systemctl restart nginx
 | 
				
			||||||
    exit
 | 
					    break
 | 
				
			||||||
    ;;
 | 
					    ;;
 | 
				
			||||||
  2)
 | 
					  2)
 | 
				
			||||||
    certbot certonly --standalone --preferred-challenges http -d $FQDN
 | 
					    certbot certonly --standalone --preferred-challenges http -d $FQDN
 | 
				
			||||||
| 
						 | 
					@ -197,7 +196,7 @@ EOF
 | 
				
			||||||
server {
 | 
					server {
 | 
				
			||||||
    listen 80;
 | 
					    listen 80;
 | 
				
			||||||
    server_name $FQDN;
 | 
					    server_name $FQDN;
 | 
				
			||||||
    return 301 https://$server_name$request_uri;
 | 
					    return 301 https://\$server_name\$request_uri;
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
server {
 | 
					server {
 | 
				
			||||||
| 
						 | 
					@ -233,7 +232,7 @@ server {
 | 
				
			||||||
    add_header Referrer-Policy same-origin;
 | 
					    add_header Referrer-Policy same-origin;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    location / {
 | 
					    location / {
 | 
				
			||||||
        try_files $uri $uri/ /index.php?$query_string;
 | 
					        try_files \$uri \$uri/ /index.php?\$query_string;
 | 
				
			||||||
    }
 | 
					    }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    location ~ \.php$ {
 | 
					    location ~ \.php$ {
 | 
				
			||||||
| 
						 | 
					@ -242,7 +241,7 @@ server {
 | 
				
			||||||
        fastcgi_index index.php;
 | 
					        fastcgi_index index.php;
 | 
				
			||||||
        include fastcgi_params;
 | 
					        include fastcgi_params;
 | 
				
			||||||
        fastcgi_param PHP_VALUE "upload_max_filesize = 100M \n post_max_size=100M";
 | 
					        fastcgi_param PHP_VALUE "upload_max_filesize = 100M \n post_max_size=100M";
 | 
				
			||||||
        fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
 | 
					        fastcgi_param SCRIPT_FILENAME \$document_root\$fastcgi_script_name;
 | 
				
			||||||
        fastcgi_param HTTP_PROXY "";
 | 
					        fastcgi_param HTTP_PROXY "";
 | 
				
			||||||
        fastcgi_intercept_errors off;
 | 
					        fastcgi_intercept_errors off;
 | 
				
			||||||
        fastcgi_buffer_size 16k;
 | 
					        fastcgi_buffer_size 16k;
 | 
				
			||||||
| 
						 | 
					@ -260,7 +259,7 @@ server {
 | 
				
			||||||
EOF
 | 
					EOF
 | 
				
			||||||
    ln -s /etc/nginx/sites-available/pelican.conf /etc/nginx/sites-enabled/pelican.conf
 | 
					    ln -s /etc/nginx/sites-available/pelican.conf /etc/nginx/sites-enabled/pelican.conf
 | 
				
			||||||
    systemctl restart nginx
 | 
					    systemctl restart nginx
 | 
				
			||||||
    exit
 | 
					    break
 | 
				
			||||||
    ;;
 | 
					    ;;
 | 
				
			||||||
  esac
 | 
					  esac
 | 
				
			||||||
done
 | 
					done
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
		Reference in New Issue