-
Notifications
You must be signed in to change notification settings - Fork 226
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #478 from andreapollastri/4.x
Server Name + Stats and Installation Fix
- Loading branch information
Showing
4 changed files
with
17 additions
and
18 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -512,6 +512,7 @@ sleep 1s | |
CREATE DATABASE IF NOT EXISTS cipi; | ||
EOF | ||
clear | ||
|
||
sudo rm -rf /var/www/html | ||
cd /var/www && git clone https://github.com/$GITREPOSITORY.git html | ||
cd /var/www/html && git pull | ||
|
@@ -523,22 +524,21 @@ sudo chmod -R o+w /var/www/html/bootstrap/cache | |
sudo chmod -R 775 /var/www/html/bootstrap/cache | ||
sudo chown -R www-data:www-data /var/www/html | ||
sudo chmod -R 775 /var/www/html | ||
PANELSETUP=/var/www/panel.sh | ||
sudo touch $PANELSETUP | ||
sudo cat > $PANELSETUP <<EOF | ||
|
||
cd /var/www/html && unlink .env | ||
cd /var/www/html && cp .env.example .env | ||
cd /var/www/html && composer install --no-interaction | ||
sudo chown -R www-data:www-data /var/www/html | ||
sudo su -l www-data -s /bin/bash -c "cd /var/www/html && composer install --no-interaction" | ||
sudo su -l www-data -s /bin/bash -c "cd /var/www/html && php artisan key:generate" | ||
rpl -i -w "APP_ENV=local" "APP_ENV=production" /var/www/html/.env | ||
rpl -i -w "APP_DEBUG=true" "APP_DEBUG=false" /var/www/html/.env | ||
rpl -i -w "APP_URL=http://localhost" "APP_URL=https://cipi-$SERVERIPWITHDASH$IPDOMAIN" /var/www/html/.env | ||
rpl -i -w "DB_PASSWORD=changeme" "DB_PASSWORD=$DATABASEPASSWORD" /var/www/html/.env | ||
rpl -i -w "PANEL_SERVER_IP=changeme" "PANEL_SERVER_IP=$SERVERIP" /var/www/html/.env | ||
rpl -i -w "PANEL_SERVER_NAME=changeme" "PANEL_SERVER_NAME=cipi-$SERVERIPWITHDASH" /var/www/html/.env | ||
rpl -i -w "PANEL_CIPI_PASSWORD=changeme" "PANEL_CIPI_PASSWORD=$USERPASSWORD" /var/www/html/.env | ||
rpl -i -w "PANEL_MYSQL_PASSWORD=changeme" "PANEL_MYSQL_PASSWORD=$DATABASEPASSWORD" /var/www/html/.env | ||
sudo su -l www-data -s /bin/bash -c "cd /var/www/html && composer install --no-interaction" | ||
sudo su -l www-data -s /bin/bash -c "cd /var/www/html && php artisan key:generate" | ||
cd /var/www/html && php artisan config:clear | ||
cd /var/www/html && php artisan migrate --seed --force | ||
cd /var/www/html && php artisan storage:link | ||
|
@@ -547,10 +547,8 @@ cd /var/www/html && php artisan route:cache | |
cd /var/www/html && php artisan view:cache | ||
cd /var/www/html && php artisan optimize | ||
sudo chown -R www-data:www-data /var/www/html | ||
EOF | ||
su -c "sh $PANELSETUP" cipi | ||
sudo unlink $PANELSETUP | ||
|
||
sudo chmod -R 775 /var/www/html | ||
git config --global --add safe.directory /var/www/html | ||
|
||
|
||
# FINE TUNING | ||
|
@@ -560,8 +558,6 @@ echo "Fine tuning..." | |
echo "${reset}" | ||
sleep 1s | ||
|
||
sudo chown www-data:www-data -R /var/www/html | ||
sudo chmod -R 775 /var/www/html | ||
sudo echo 'DefaultStartLimitIntervalSec=1s' >> /usr/lib/systemd/system/[email protected] | ||
sudo echo 'DefaultStartLimitBurst=50' >> /usr/lib/systemd/system/[email protected] | ||
sudo echo 'StartLimitBurst=0' >> /usr/lib/systemd/system/[email protected] | ||
|