mirror of
https://github.com/vitodeploy/vito.git
synced 2025-07-03 23:12:35 +00:00
init
This commit is contained in:
9
system/commands/ubuntu/webserver/nginx/change-php-version.sh
Executable file
9
system/commands/ubuntu/webserver/nginx/change-php-version.sh
Executable file
@ -0,0 +1,9 @@
|
||||
if ! sudo sed -i 's/php__old_version__/php__new_version__/g' /etc/nginx/sites-available/__domain__; then
|
||||
echo 'VITO_SSH_ERROR' && exit 1
|
||||
fi
|
||||
|
||||
if ! sudo service nginx restart; then
|
||||
echo 'VITO_SSH_ERROR' && exit 1
|
||||
fi
|
||||
|
||||
echo "PHP Version Changed to __new_version__"
|
@ -0,0 +1,17 @@
|
||||
if ! sudo chown -R 755 /home/vito/phpmyadmin; then
|
||||
echo 'VITO_SSH_ERROR' && exit 1
|
||||
fi
|
||||
|
||||
if ! echo '__vhost__' | sudo tee /etc/nginx/sites-available/phpmyadmin; then
|
||||
echo 'VITO_SSH_ERROR' && exit 1
|
||||
fi
|
||||
|
||||
if ! sudo ln -s /etc/nginx/sites-available/phpmyadmin /etc/nginx/sites-enabled/; then
|
||||
echo 'VITO_SSH_ERROR' && exit 1
|
||||
fi
|
||||
|
||||
if ! sudo service nginx restart; then
|
||||
echo 'VITO_SSH_ERROR' && exit 1
|
||||
fi
|
||||
|
||||
echo "PHPMyAdmin vhost created"
|
27
system/commands/ubuntu/webserver/nginx/create-vhost.sh
Executable file
27
system/commands/ubuntu/webserver/nginx/create-vhost.sh
Executable file
@ -0,0 +1,27 @@
|
||||
if ! rm -rf __path__; then
|
||||
echo 'VITO_SSH_ERROR' && exit 1
|
||||
fi
|
||||
|
||||
if ! mkdir __path__; then
|
||||
echo 'VITO_SSH_ERROR' && exit 1
|
||||
fi
|
||||
|
||||
if ! sudo chown -R 755 __path__; then
|
||||
echo 'VITO_SSH_ERROR' && exit 1
|
||||
fi
|
||||
|
||||
if ! echo '' | sudo tee /etc/nginx/conf.d/__domain___redirects; then
|
||||
echo 'VITO_SSH_ERROR' && exit 1
|
||||
fi
|
||||
|
||||
if ! echo '__vhost__' | sudo tee /etc/nginx/sites-available/__domain__; then
|
||||
echo 'VITO_SSH_ERROR' && exit 1
|
||||
fi
|
||||
|
||||
if ! sudo ln -s /etc/nginx/sites-available/__domain__ /etc/nginx/sites-enabled/; then
|
||||
echo 'VITO_SSH_ERROR' && exit 1
|
||||
fi
|
||||
|
||||
if ! sudo service nginx restart; then
|
||||
echo 'VITO_SSH_ERROR' && exit 1
|
||||
fi
|
@ -0,0 +1,11 @@
|
||||
sudo rm -rf __path__
|
||||
|
||||
sudo rm /etc/nginx/sites-available/phpmyadmin
|
||||
|
||||
sudo rm /etc/nginx/sites-enabled/phpmyadmin
|
||||
|
||||
if ! sudo service nginx restart; then
|
||||
echo 'VITO_SSH_ERROR' && exit 1
|
||||
fi
|
||||
|
||||
echo "PHPMyAdmin deleted"
|
7
system/commands/ubuntu/webserver/nginx/delete-site.sh
Executable file
7
system/commands/ubuntu/webserver/nginx/delete-site.sh
Executable file
@ -0,0 +1,7 @@
|
||||
rm -rf __path__
|
||||
|
||||
sudo rm /etc/nginx/sites-available/__domain__
|
||||
|
||||
sudo rm /etc/nginx/sites-enabled/__domain__
|
||||
|
||||
echo "Site deleted"
|
@ -0,0 +1,7 @@
|
||||
if ! echo '__redirects__' | sudo tee /etc/nginx/conf.d/__domain___redirects; then
|
||||
echo 'VITO_SSH_ERROR' && exit 1
|
||||
fi
|
||||
|
||||
if ! sudo service nginx restart; then
|
||||
echo 'VITO_SSH_ERROR' && exit 1
|
||||
fi
|
7
system/commands/ubuntu/webserver/nginx/update-vhost.sh
Executable file
7
system/commands/ubuntu/webserver/nginx/update-vhost.sh
Executable file
@ -0,0 +1,7 @@
|
||||
if ! echo '__vhost__' | sudo tee /etc/nginx/sites-available/__domain__; then
|
||||
echo 'VITO_SSH_ERROR' && exit 1
|
||||
fi
|
||||
|
||||
if ! sudo service nginx restart; then
|
||||
echo 'VITO_SSH_ERROR' && exit 1
|
||||
fi
|
Reference in New Issue
Block a user