WordPress Deployment Fix (#441)

* Resolved Issue with WordPress

* Fix for Vito User
This commit is contained in:
Richard Anderson 2025-01-22 19:24:44 +00:00 committed by GitHub
parent bfdf3533fd
commit b63ddfc568
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
3 changed files with 5 additions and 5 deletions

View File

@ -9,6 +9,7 @@ sudo mkdir /home/__user__/tmp
sudo mkdir /home/__user__/bin
sudo mkdir /home/__user__/.ssh
echo 'export PATH="/home/__user__/bin:$PATH"' | sudo tee -a /home/__user__/.bashrc
echo 'export PATH="/home/__user__/bin:$PATH"' | sudo tee -a /home/__user__/.profile
sudo usermod -a -G __user__ __server_user__
sudo chown -R __user__:__user__ /home/__user__
sudo chmod -R 755 /home/__user__

View File

@ -15,7 +15,7 @@ public function install(Site $site): void
$this->getScript('install.sh', [
'path' => $site->path,
'domain' => $site->domain,
'is_isolated' => $site->isIsolated(),
'is_isolated' => $site->isIsolated() ? 'true' : 'false',
'isolated_username' => $site->user,
'db_name' => $site->type_data['database'],
'db_user' => $site->type_data['database_user'],

View File

@ -7,11 +7,10 @@ if ! chmod +x wp-cli.phar; then
fi
if [ "__is_isolated__" == "true" ]; then
if ! mv wp-cli.phar /home/__isolated_username__/bin/wp; then
echo 'VITO_SSH_ERROR' && exit 1
fi
mv wp-cli.phar /home/__isolated_username__/bin/
ln -s /home/__isolated_username__/bin/wp-cli.phar /home/__isolated_username__/bin/wp
else
if ! mv wp-cli.phar /usr/local/bin/wp; then
if ! sudo mv wp-cli.phar /usr/local/bin/wp; then
echo 'VITO_SSH_ERROR' && exit 1
fi
fi