Fix installer bugs: broken root checks, PHP version mismatches, dead paths
- Replace $EUID with $(id -u) for root checks across all bin/*.sh and install.sh: dash (Debian's /bin/sh) never sets $EUID, so the check was silently broken everywhere. - lemp.sh: make apt-get upgrade non-interactive (--yes), align the Redis PHP module and php-fpm restart with $PHP_VERSION instead of a hardcoded 8.1, and template the nginx PHP-FPM socket path via a PHP_FPM_SOCK placeholder substituted at install time. - nginx-phpmyadmin.conf: fix docroot to match the actual phpMyAdmin symlink location created by lemp.sh. - mysql-db.sh: inline the root check instead of sourcing the nonexistent bin/checkroot.sh. - webhook.sh: fix chowm typo (chown). - urbackup.sh: copy the systemd unit from assets/ instead of a relative path to a file that doesn't exist in the repo. - _addUserSite.sh: fix invalid `$var=value` assignment and an empty if-block that was a POSIX sh syntax error. Also carries over pending fixes to deploy-drupal.sh (drush now invoked via vendor/bin/drush) and gitbarrerepos.sh (comment cleanup). Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
This commit is contained in:
@@ -53,7 +53,7 @@ server {
|
||||
|
||||
# pass PHP scripts to FastCGI server
|
||||
location ~ \.php$ {
|
||||
fastcgi_pass unix:/run/php/php7.0-fpm.sock;
|
||||
fastcgi_pass unix:/run/php/PHP_FPM_SOCK;
|
||||
fastcgi_index index.php;
|
||||
include fastcgi_params;
|
||||
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
#!/bin/bash
|
||||
|
||||
echo "updating drupal 8"
|
||||
echo "updating drupal"
|
||||
echo "Switching to project docroot."
|
||||
cd ./public_html
|
||||
echo ""
|
||||
@@ -9,18 +9,18 @@ git pull --ff-only origin prod
|
||||
git submodule update --init --recursive
|
||||
echo ""
|
||||
echo "Clearing drush caches."
|
||||
drush cache-clear drush
|
||||
vendor/bin/drush cache-clear drush
|
||||
echo ""
|
||||
echo "Composer install."
|
||||
composer install --no-dev
|
||||
echo ""
|
||||
echo "Running database updates."
|
||||
drush updb -y
|
||||
vendor/bin/drush updb -y
|
||||
echo ""
|
||||
echo "Importing configuration."
|
||||
drush config-import -y
|
||||
vendor/bin/drush config-import -y
|
||||
echo ""
|
||||
echo "Clearing caches."
|
||||
drush cr
|
||||
vendor/bin/drush cr
|
||||
echo ""
|
||||
echo "Deployment complete."
|
||||
|
||||
@@ -2,7 +2,7 @@ server {
|
||||
listen 80;
|
||||
location /phpmyadmin {
|
||||
# server_name phpmyadmin.idroot.net;
|
||||
root /var/www/phpmyadmin;
|
||||
root /var/www/html;
|
||||
|
||||
index index.php;
|
||||
|
||||
@@ -22,7 +22,7 @@ server {
|
||||
}
|
||||
|
||||
location ~ \.php$ {
|
||||
fastcgi_pass unix:/run/php/php8.2-fpm.sock;
|
||||
fastcgi_pass unix:/run/php/PHP_FPM_SOCK;
|
||||
fastcgi_index index.php;
|
||||
include fastcgi_params;
|
||||
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
|
||||
|
||||
Reference in New Issue
Block a user