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:
@@ -110,10 +110,10 @@ if [ "$vh" = "yes" ]; then
|
||||
cd /home/"$user"/git-repositories/"$_domain".git/hooks/
|
||||
chmod +x post-receive # pre-receive
|
||||
|
||||
# setup git repo on site folder
|
||||
echo "setup git repo on site folder"
|
||||
cd /home/"$user"/www/"$_domain"/public_html
|
||||
su -c "git init" $user
|
||||
# link to the bare repo
|
||||
echo "link to the bare repo"
|
||||
su -c "git remote add origin /home/$user/git-repositories/$_domain.git" $user
|
||||
chown -R "$user":"$user" /home/"$user"/www/"$_domain"
|
||||
|
||||
|
||||
Reference in New Issue
Block a user