mirror of
https://github.com/vitodeploy/vito.git
synced 2025-07-01 05:56:16 +00:00
refactoring
This commit is contained in:
7
resources/commands/cronjobs/update-cron-jobs.sh
Executable file
7
resources/commands/cronjobs/update-cron-jobs.sh
Executable file
@ -0,0 +1,7 @@
|
||||
if ! echo '__data__' | sudo -u __user__ crontab -; then
|
||||
echo 'VITO_SSH_ERROR' && exit 1
|
||||
fi
|
||||
|
||||
if ! sudo -u __user__ crontab -l; then
|
||||
echo 'VITO_SSH_ERROR' && exit 1
|
||||
fi
|
12
resources/commands/database/install-mariadb.sh
Executable file
12
resources/commands/database/install-mariadb.sh
Executable file
@ -0,0 +1,12 @@
|
||||
wget https://downloads.mariadb.com/MariaDB/mariadb_repo_setup
|
||||
|
||||
chmod +x mariadb_repo_setup
|
||||
|
||||
sudo DEBIAN_FRONTEND=noninteractive ./mariadb_repo_setup \
|
||||
--mariadb-server-version="mariadb-10.3"
|
||||
|
||||
sudo DEBIAN_FRONTEND=noninteractive apt update
|
||||
|
||||
sudo DEBIAN_FRONTEND=noninteractive apt install mariadb-server mariadb-backup -y
|
||||
|
||||
sudo service mysql start
|
19
resources/commands/database/install-mysql-8.sh
Executable file
19
resources/commands/database/install-mysql-8.sh
Executable file
@ -0,0 +1,19 @@
|
||||
wget -c https://dev.mysql.com/get/mysql-apt-config_0.8.22-1_all.deb
|
||||
|
||||
sudo DEBIAN_FRONTEND=noninteractive dpkg -i mysql-apt-config_0.8.22-1_all.deb
|
||||
|
||||
sudo DEBIAN_FRONTEND=noninteractive apt update
|
||||
|
||||
sudo DEBIAN_FRONTEND=noninteractive apt install mysql-server -y
|
||||
|
||||
sudo service mysql enable
|
||||
|
||||
sudo service mysql start
|
||||
|
||||
if ! sudo mysql -e "ALTER USER 'root'@'localhost' IDENTIFIED WITH auth_socket;"; then
|
||||
echo 'VITO_SSH_ERROR' && exit 1
|
||||
fi
|
||||
|
||||
if ! sudo mysql -e "FLUSH PRIVILEGES"; then
|
||||
echo 'VITO_SSH_ERROR' && exit 1
|
||||
fi
|
13
resources/commands/database/install-mysql.sh
Executable file
13
resources/commands/database/install-mysql.sh
Executable file
@ -0,0 +1,13 @@
|
||||
sudo DEBIAN_FRONTEND=noninteractive apt install mysql-server -y
|
||||
|
||||
sudo service mysql enable
|
||||
|
||||
sudo service mysql start
|
||||
|
||||
if ! sudo mysql -e "ALTER USER 'root'@'localhost' IDENTIFIED WITH auth_socket;"; then
|
||||
echo 'VITO_SSH_ERROR' && exit 1
|
||||
fi
|
||||
|
||||
if ! sudo mysql -e "FLUSH PRIVILEGES"; then
|
||||
echo 'VITO_SSH_ERROR' && exit 1
|
||||
fi
|
11
resources/commands/database/mysql/backup.sh
Normal file
11
resources/commands/database/mysql/backup.sh
Normal file
@ -0,0 +1,11 @@
|
||||
if ! sudo DEBIAN_FRONTEND=noninteractive mysqldump -u root __database__ > __file__.sql; then
|
||||
echo 'VITO_SSH_ERROR' && exit 1
|
||||
fi
|
||||
|
||||
if ! DEBIAN_FRONTEND=noninteractive zip __file__.zip __file__.sql; then
|
||||
echo 'VITO_SSH_ERROR' && exit 1
|
||||
fi
|
||||
|
||||
if ! rm __file__.sql; then
|
||||
echo 'VITO_SSH_ERROR' && exit 1
|
||||
fi
|
9
resources/commands/database/mysql/create-user.sh
Executable file
9
resources/commands/database/mysql/create-user.sh
Executable file
@ -0,0 +1,9 @@
|
||||
if ! sudo mysql -e "CREATE USER IF NOT EXISTS '__username__'@'__host__' IDENTIFIED BY '__password__'"; then
|
||||
echo 'VITO_SSH_ERROR' && exit 1
|
||||
fi
|
||||
|
||||
if ! sudo mysql -e "FLUSH PRIVILEGES"; then
|
||||
echo 'VITO_SSH_ERROR' && exit 1
|
||||
fi
|
||||
|
||||
echo "Command executed"
|
5
resources/commands/database/mysql/create.sh
Executable file
5
resources/commands/database/mysql/create.sh
Executable file
@ -0,0 +1,5 @@
|
||||
if ! sudo mysql -e "CREATE DATABASE IF NOT EXISTS __name__ CHARACTER SET utf8 COLLATE utf8_general_ci"; then
|
||||
echo 'VITO_SSH_ERROR' && exit 1
|
||||
fi
|
||||
|
||||
echo "Command executed"
|
9
resources/commands/database/mysql/delete-user.sh
Executable file
9
resources/commands/database/mysql/delete-user.sh
Executable file
@ -0,0 +1,9 @@
|
||||
if ! sudo mysql -e "DROP USER IF EXISTS '__username__'@'__host__'"; then
|
||||
echo 'VITO_SSH_ERROR' && exit 1
|
||||
fi
|
||||
|
||||
if ! sudo mysql -e "FLUSH PRIVILEGES"; then
|
||||
echo 'VITO_SSH_ERROR' && exit 1
|
||||
fi
|
||||
|
||||
echo "Command executed"
|
5
resources/commands/database/mysql/delete.sh
Executable file
5
resources/commands/database/mysql/delete.sh
Executable file
@ -0,0 +1,5 @@
|
||||
if ! sudo mysql -e "DROP DATABASE IF EXISTS __name__"; then
|
||||
echo 'VITO_SSH_ERROR' && exit 1
|
||||
fi
|
||||
|
||||
echo "Command executed"
|
9
resources/commands/database/mysql/link.sh
Executable file
9
resources/commands/database/mysql/link.sh
Executable file
@ -0,0 +1,9 @@
|
||||
if ! sudo mysql -e "GRANT ALL PRIVILEGES ON __database__.* TO '__username__'@'__host__'"; then
|
||||
echo 'VITO_SSH_ERROR' && exit 1
|
||||
fi
|
||||
|
||||
if ! sudo mysql -e "FLUSH PRIVILEGES"; then
|
||||
echo 'VITO_SSH_ERROR' && exit 1
|
||||
fi
|
||||
|
||||
echo "Linking to __database__ finished"
|
11
resources/commands/database/mysql/restore.sh
Normal file
11
resources/commands/database/mysql/restore.sh
Normal file
@ -0,0 +1,11 @@
|
||||
if ! DEBIAN_FRONTEND=noninteractive unzip __file__.zip; then
|
||||
echo 'VITO_SSH_ERROR' && exit 1
|
||||
fi
|
||||
|
||||
if ! sudo DEBIAN_FRONTEND=noninteractive mysql -u root __database__ < __file__.sql; then
|
||||
echo 'VITO_SSH_ERROR' && exit 1
|
||||
fi
|
||||
|
||||
if ! rm __file__.sql __file__.zip; then
|
||||
echo 'VITO_SSH_ERROR' && exit 1
|
||||
fi
|
5
resources/commands/database/mysql/unlink.sh
Executable file
5
resources/commands/database/mysql/unlink.sh
Executable file
@ -0,0 +1,5 @@
|
||||
if ! sudo mysql -e "REVOKE ALL PRIVILEGES, GRANT OPTION FROM '__username__'@'__host__'"; then
|
||||
echo 'VITO_SSH_ERROR' && exit 1
|
||||
fi
|
||||
|
||||
echo "Command executed"
|
11
resources/commands/firewall/ufw/add-rule.sh
Executable file
11
resources/commands/firewall/ufw/add-rule.sh
Executable file
@ -0,0 +1,11 @@
|
||||
if ! sudo ufw __type__ from __source____mask__ to any proto __protocol__ port __port__; then
|
||||
echo 'VITO_SSH_ERROR' && exit 1
|
||||
fi
|
||||
|
||||
if ! sudo ufw reload; then
|
||||
echo 'VITO_SSH_ERROR' && exit 1
|
||||
fi
|
||||
|
||||
if ! sudo service ufw restart; then
|
||||
echo 'VITO_SSH_ERROR' && exit 1
|
||||
fi
|
27
resources/commands/firewall/ufw/install-ufw.sh
Executable file
27
resources/commands/firewall/ufw/install-ufw.sh
Executable file
@ -0,0 +1,27 @@
|
||||
if ! sudo ufw default deny incoming; then
|
||||
echo 'VITO_SSH_ERROR' && exit 1
|
||||
fi
|
||||
|
||||
if ! sudo ufw default allow outgoing; then
|
||||
echo 'VITO_SSH_ERROR' && exit 1
|
||||
fi
|
||||
|
||||
if ! sudo ufw allow from 0.0.0.0/0 to any proto tcp port 22; then
|
||||
echo 'VITO_SSH_ERROR' && exit 1
|
||||
fi
|
||||
|
||||
if ! sudo ufw allow from 0.0.0.0/0 to any proto tcp port 80; then
|
||||
echo 'VITO_SSH_ERROR' && exit 1
|
||||
fi
|
||||
|
||||
if ! sudo ufw allow from 0.0.0.0/0 to any proto tcp port 443; then
|
||||
echo 'VITO_SSH_ERROR' && exit 1
|
||||
fi
|
||||
|
||||
if ! sudo ufw --force enable; then
|
||||
echo 'VITO_SSH_ERROR' && exit 1
|
||||
fi
|
||||
|
||||
if ! sudo ufw reload; then
|
||||
echo 'VITO_SSH_ERROR' && exit 1
|
||||
fi
|
11
resources/commands/firewall/ufw/remove-rule.sh
Executable file
11
resources/commands/firewall/ufw/remove-rule.sh
Executable file
@ -0,0 +1,11 @@
|
||||
if ! sudo ufw delete __type__ from __source____mask__ to any proto __protocol__ port __port__; then
|
||||
echo 'VITO_SSH_ERROR' && exit 1
|
||||
fi
|
||||
|
||||
if ! sudo ufw reload; then
|
||||
echo 'VITO_SSH_ERROR' && exit 1
|
||||
fi
|
||||
|
||||
if ! sudo service ufw restart; then
|
||||
echo 'VITO_SSH_ERROR' && exit 1
|
||||
fi
|
5
resources/commands/installation/install-nodejs.sh
Executable file
5
resources/commands/installation/install-nodejs.sh
Executable file
@ -0,0 +1,5 @@
|
||||
curl -fsSL https://deb.nodesource.com/setup_lts.x | sudo -E bash -;
|
||||
|
||||
sudo DEBIAN_FRONTEND=noninteractive apt update
|
||||
|
||||
sudo DEBIAN_FRONTEND=noninteractive apt install nodejs -y
|
7
resources/commands/installation/install-redis.sh
Executable file
7
resources/commands/installation/install-redis.sh
Executable file
@ -0,0 +1,7 @@
|
||||
sudo DEBIAN_FRONTEND=noninteractive apt install redis-server -y
|
||||
|
||||
sudo sed -i 's/bind 127.0.0.1 ::1/bind 0.0.0.0/g' /etc/redis/redis.conf
|
||||
|
||||
sudo service redis enable
|
||||
|
||||
sudo service redis start
|
3
resources/commands/installation/install-requirements.sh
Executable file
3
resources/commands/installation/install-requirements.sh
Executable file
@ -0,0 +1,3 @@
|
||||
sudo DEBIAN_FRONTEND=noninteractive apt install -y software-properties-common curl zip unzip git gcc
|
||||
git config --global user.email "__email__"
|
||||
git config --global user.name "__name__"
|
11
resources/commands/php/change-default-php.sh
Executable file
11
resources/commands/php/change-default-php.sh
Executable file
@ -0,0 +1,11 @@
|
||||
if ! sudo rm /usr/bin/php; then
|
||||
echo 'VITO_SSH_ERROR' && exit 1
|
||||
fi
|
||||
|
||||
if ! sudo ln -s /usr/bin/php__version__ /usr/bin/php; then
|
||||
echo 'VITO_SSH_ERROR' && exit 1
|
||||
fi
|
||||
|
||||
echo "Default php is: \n"
|
||||
|
||||
php -v
|
1
resources/commands/php/get-php-ini.sh
Normal file
1
resources/commands/php/get-php-ini.sh
Normal file
@ -0,0 +1 @@
|
||||
cat /etc/php/__version__/cli/php.ini
|
7
resources/commands/php/install-composer.sh
Executable file
7
resources/commands/php/install-composer.sh
Executable file
@ -0,0 +1,7 @@
|
||||
cd ~
|
||||
|
||||
curl -sS https://getcomposer.org/installer -o composer-setup.php
|
||||
|
||||
sudo php composer-setup.php --install-dir=/usr/local/bin --filename=composer
|
||||
|
||||
composer
|
5
resources/commands/php/install-php-extension.sh
Normal file
5
resources/commands/php/install-php-extension.sh
Normal file
@ -0,0 +1,5 @@
|
||||
sudo apt install -y php__version__-__name__
|
||||
|
||||
sudo service php__version__-fpm restart
|
||||
|
||||
php__version__ -m
|
13
resources/commands/php/install-php.sh
Executable file
13
resources/commands/php/install-php.sh
Executable file
@ -0,0 +1,13 @@
|
||||
sudo add-apt-repository ppa:ondrej/php -y
|
||||
|
||||
sudo DEBIAN_FRONTEND=noninteractive apt update
|
||||
|
||||
sudo DEBIAN_FRONTEND=noninteractive apt install -y php__version__ php__version__-fpm php__version__-mbstring php__version__-mysql php__version__-mcrypt php__version__-gd php__version__-xml php__version__-curl php__version__-gettext php__version__-zip php__version__-bcmath php__version__-soap php__version__-redis
|
||||
|
||||
if ! sudo sed -i 's/www-data/__user__/g' /etc/php/__version__/fpm/pool.d/www.conf; then
|
||||
echo 'VITO_SSH_ERROR' && exit 1
|
||||
fi
|
||||
|
||||
sudo service php__version__-fpm enable
|
||||
|
||||
sudo service php__version__-fpm start
|
5
resources/commands/php/uninstall-php.sh
Executable file
5
resources/commands/php/uninstall-php.sh
Executable file
@ -0,0 +1,5 @@
|
||||
sudo service php__version__-fpm stop
|
||||
|
||||
if ! sudo DEBIAN_FRONTEND=noninteractive apt remove -y php__version__ php__version__-fpm php__version__-mbstring php__version__-mysql php__version__-mcrypt php__version__-gd php__version__-xml php__version__-curl php__version__-gettext php__version__-zip php__version__-bcmath php__version__-soap php__version__-redis; then
|
||||
echo 'VITO_SSH_ERROR' && exit 1
|
||||
fi
|
11
resources/commands/php/update-php-settings.sh
Normal file
11
resources/commands/php/update-php-settings.sh
Normal file
@ -0,0 +1,11 @@
|
||||
if ! sudo sed -i 's,^__variable__ =.*$,__variable__ = __value__,' /etc/php/__version__/cli/php.ini; then
|
||||
echo 'VITO_SSH_ERROR' && exit 1
|
||||
fi
|
||||
|
||||
if ! sudo sed -i 's,^__variable__ =.*$,__variable__ = __value__,' /etc/php/__version__/fpm/php.ini; then
|
||||
echo 'VITO_SSH_ERROR' && exit 1
|
||||
fi
|
||||
|
||||
if ! sudo service php__version__-fpm restart; then
|
||||
echo 'VITO_SSH_ERROR' && exit 1
|
||||
fi
|
17
resources/commands/phpmyadmin/create-phpmyadmin-vhost.sh
Normal file
17
resources/commands/phpmyadmin/create-phpmyadmin-vhost.sh
Normal file
@ -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"
|
11
resources/commands/phpmyadmin/delete-phpmyadmin-vhost.sh
Normal file
11
resources/commands/phpmyadmin/delete-phpmyadmin-vhost.sh
Normal file
@ -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"
|
21
resources/commands/phpmyadmin/download-phpmyadmin.sh
Normal file
21
resources/commands/phpmyadmin/download-phpmyadmin.sh
Normal file
@ -0,0 +1,21 @@
|
||||
sudo rm -rf phpmyadmin
|
||||
|
||||
if ! wget https://files.phpmyadmin.net/phpMyAdmin/5.1.2/phpMyAdmin-5.1.2-all-languages.zip; then
|
||||
echo 'VITO_SSH_ERROR' && exit 1
|
||||
fi
|
||||
|
||||
if ! unzip phpMyAdmin-5.1.2-all-languages.zip; then
|
||||
echo 'VITO_SSH_ERROR' && exit 1
|
||||
fi
|
||||
|
||||
if ! rm -rf phpMyAdmin-5.1.2-all-languages.zip; then
|
||||
echo 'VITO_SSH_ERROR' && exit 1
|
||||
fi
|
||||
|
||||
if ! mv phpMyAdmin-5.1.2-all-languages phpmyadmin; then
|
||||
echo 'VITO_SSH_ERROR' && exit 1
|
||||
fi
|
||||
|
||||
if ! mv phpmyadmin/config.sample.inc.php phpmyadmin/config.inc.php; then
|
||||
echo 'VITO_SSH_ERROR' && exit 1
|
||||
fi
|
3
resources/commands/service/restart-service.sh
Normal file
3
resources/commands/service/restart-service.sh
Normal file
@ -0,0 +1,3 @@
|
||||
sudo service __service__ restart
|
||||
|
||||
sudo service __service__ status | cat
|
1
resources/commands/service/service-status.sh
Executable file
1
resources/commands/service/service-status.sh
Executable file
@ -0,0 +1 @@
|
||||
sudo service __service__ status | cat
|
3
resources/commands/service/start-service.sh
Normal file
3
resources/commands/service/start-service.sh
Normal file
@ -0,0 +1,3 @@
|
||||
sudo service __service__ start
|
||||
|
||||
sudo service __service__ status | cat
|
3
resources/commands/service/stop-service.sh
Normal file
3
resources/commands/service/stop-service.sh
Normal file
@ -0,0 +1,3 @@
|
||||
sudo service __service__ stop
|
||||
|
||||
sudo service __service__ status | cat
|
13
resources/commands/ssl/create-custom-ssl.sh
Normal file
13
resources/commands/ssl/create-custom-ssl.sh
Normal file
@ -0,0 +1,13 @@
|
||||
if ! sudo mkdir __path__; then
|
||||
echo 'VITO_SSH_ERROR' && exit 1
|
||||
fi
|
||||
|
||||
if ! echo __certificate__ | sudo tee __certificate_path__; then
|
||||
echo 'VITO_SSH_ERROR' && exit 1
|
||||
fi
|
||||
|
||||
if ! echo __pk__ | sudo tee __pk_path__; then
|
||||
echo 'VITO_SSH_ERROR' && exit 1
|
||||
fi
|
||||
|
||||
echo "Successfully received certificate."
|
3
resources/commands/ssl/create-letsencrypt-ssl.sh
Normal file
3
resources/commands/ssl/create-letsencrypt-ssl.sh
Normal file
@ -0,0 +1,3 @@
|
||||
if ! sudo certbot certonly --force-renewal --nginx --noninteractive --agree-tos --cert-name __domain__ -m __email__ -d __domain__ --verbose; then
|
||||
echo 'VITO_SSH_ERROR' && exit 1
|
||||
fi
|
1
resources/commands/ssl/install-certbot.sh
Executable file
1
resources/commands/ssl/install-certbot.sh
Executable file
@ -0,0 +1 @@
|
||||
sudo DEBIAN_FRONTEND=noninteractive apt install certbot python3-certbot-nginx -y
|
4
resources/commands/storage/download-from-dropbox.sh
Normal file
4
resources/commands/storage/download-from-dropbox.sh
Normal file
@ -0,0 +1,4 @@
|
||||
curl -o __dest__ --location --request POST 'https://content.dropboxapi.com/2/files/download' \
|
||||
--header 'Accept: application/json' \
|
||||
--header 'Dropbox-API-Arg: {"path":"__src__"}' \
|
||||
--header 'Authorization: Bearer __token__'
|
6
resources/commands/storage/upload-to-dropbox.sh
Normal file
6
resources/commands/storage/upload-to-dropbox.sh
Normal file
@ -0,0 +1,6 @@
|
||||
curl --location --request POST 'https://content.dropboxapi.com/2/files/upload' \
|
||||
--header 'Accept: application/json' \
|
||||
--header 'Dropbox-API-Arg: {"path":"__dest__"}' \
|
||||
--header 'Content-Type: text/plain; charset=dropbox-cors-hack' \
|
||||
--header 'Authorization: Bearer __token__' \
|
||||
--data-binary '@__src__'
|
21
resources/commands/supervisor/create-worker.sh
Normal file
21
resources/commands/supervisor/create-worker.sh
Normal file
@ -0,0 +1,21 @@
|
||||
mkdir -p ~/.logs
|
||||
|
||||
mkdir -p ~/.logs/workers
|
||||
|
||||
touch ~/.logs/workers/__id__.log
|
||||
|
||||
if ! echo '__config__' | sudo tee /etc/supervisor/conf.d/__id__.conf; then
|
||||
echo 'VITO_SSH_ERROR' && exit 1
|
||||
fi
|
||||
|
||||
if ! sudo supervisorctl reread; then
|
||||
echo 'VITO_SSH_ERROR' && exit 1
|
||||
fi
|
||||
|
||||
if ! sudo supervisorctl update; then
|
||||
echo 'VITO_SSH_ERROR' && exit 1
|
||||
fi
|
||||
|
||||
if ! sudo supervisorctl start __id__:*; then
|
||||
echo 'VITO_SSH_ERROR' && exit 1
|
||||
fi
|
20
resources/commands/supervisor/delete-worker.sh
Normal file
20
resources/commands/supervisor/delete-worker.sh
Normal file
@ -0,0 +1,20 @@
|
||||
if ! sudo supervisorctl stop __id__:*; then
|
||||
echo 'VITO_SSH_ERROR' && exit 1
|
||||
fi
|
||||
|
||||
if ! sudo rm -rf ~/.logs/workers/__id__.log; then
|
||||
echo 'VITO_SSH_ERROR' && exit 1
|
||||
fi
|
||||
|
||||
if ! sudo rm -rf /etc/supervisor/conf.d/__id__.conf; then
|
||||
echo 'VITO_SSH_ERROR' && exit 1
|
||||
fi
|
||||
|
||||
if ! sudo supervisorctl reread; then
|
||||
echo 'VITO_SSH_ERROR' && exit 1
|
||||
fi
|
||||
|
||||
if ! sudo supervisorctl update; then
|
||||
echo 'VITO_SSH_ERROR' && exit 1
|
||||
fi
|
||||
|
5
resources/commands/supervisor/install-supervisor.sh
Executable file
5
resources/commands/supervisor/install-supervisor.sh
Executable file
@ -0,0 +1,5 @@
|
||||
sudo DEBIAN_FRONTEND=noninteractive apt-get install supervisor -y
|
||||
|
||||
sudo service supervisor enable
|
||||
|
||||
sudo service supervisor start
|
3
resources/commands/supervisor/restart-worker.sh
Normal file
3
resources/commands/supervisor/restart-worker.sh
Normal file
@ -0,0 +1,3 @@
|
||||
if ! sudo supervisorctl restart __id__:*; then
|
||||
echo 'VITO_SSH_ERROR' && exit 1
|
||||
fi
|
3
resources/commands/supervisor/start-worker.sh
Normal file
3
resources/commands/supervisor/start-worker.sh
Normal file
@ -0,0 +1,3 @@
|
||||
if ! sudo supervisorctl start __id__:*; then
|
||||
echo 'VITO_SSH_ERROR' && exit 1
|
||||
fi
|
3
resources/commands/supervisor/stop-worker.sh
Normal file
3
resources/commands/supervisor/stop-worker.sh
Normal file
@ -0,0 +1,3 @@
|
||||
if ! sudo supervisorctl stop __id__:*; then
|
||||
echo 'VITO_SSH_ERROR' && exit 1
|
||||
fi
|
10
resources/commands/supervisor/worker.conf
Normal file
10
resources/commands/supervisor/worker.conf
Normal file
@ -0,0 +1,10 @@
|
||||
[program:__name__]
|
||||
process_name=%(program_name)s_%(process_num)02d
|
||||
command=__command__
|
||||
autostart=__auto_start__
|
||||
autorestart=__auto_restart__
|
||||
user=__user__
|
||||
numprocs=__numprocs__
|
||||
redirect_stderr=true
|
||||
stdout_logfile=__log_file__
|
||||
stopwaitsecs=3600
|
11
resources/commands/system/create-user.sh
Executable file
11
resources/commands/system/create-user.sh
Executable file
@ -0,0 +1,11 @@
|
||||
export DEBIAN_FRONTEND=noninteractive
|
||||
echo "__key__" | sudo tee -a /home/root/.ssh/authorized_keys
|
||||
sudo useradd -p $(openssl passwd -1 __password__) __user__
|
||||
sudo usermod -aG sudo __user__
|
||||
echo "__user__ ALL=(ALL) NOPASSWD:ALL" | sudo tee -a /etc/sudoers
|
||||
sudo mkdir /home/__user__
|
||||
sudo mkdir /home/__user__/.ssh
|
||||
echo "__key__" | sudo tee -a /home/__user__/.ssh/authorized_keys
|
||||
sudo chown -R __user__:__user__ /home/__user__
|
||||
sudo chsh -s /bin/bash __user__
|
||||
sudo su - __user__ -c "ssh-keygen -t rsa -N '' -f ~/.ssh/id_rsa" <<< y
|
1
resources/commands/system/delete-ssh-key.sh
Normal file
1
resources/commands/system/delete-ssh-key.sh
Normal file
@ -0,0 +1 @@
|
||||
sudo sed -i 's/__key__//g' ~/.ssh/authorized_keys
|
3
resources/commands/system/deploy-ssh-key.sh
Normal file
3
resources/commands/system/deploy-ssh-key.sh
Normal file
@ -0,0 +1,3 @@
|
||||
if ! echo '__key__' | sudo tee -a ~/.ssh/authorized_keys; then
|
||||
echo 'VITO_SSH_ERROR' && exit 1
|
||||
fi
|
3
resources/commands/system/edit-file.sh
Normal file
3
resources/commands/system/edit-file.sh
Normal file
@ -0,0 +1,3 @@
|
||||
if ! echo "__content__" | tee __path__; then
|
||||
echo 'VITO_SSH_ERROR' && exit 1
|
||||
fi
|
1
resources/commands/system/generate-ssh-key.sh
Normal file
1
resources/commands/system/generate-ssh-key.sh
Normal file
@ -0,0 +1 @@
|
||||
ssh-keygen -t rsa -b 4096 -N "" -f ~/.ssh/__name__
|
1
resources/commands/system/get-public-key.sh
Executable file
1
resources/commands/system/get-public-key.sh
Executable file
@ -0,0 +1 @@
|
||||
cat ~/.ssh/id_rsa.pub
|
1
resources/commands/system/read-ssh-key.sh
Normal file
1
resources/commands/system/read-ssh-key.sh
Normal file
@ -0,0 +1 @@
|
||||
cat ~/.ssh/__name__.pub
|
3
resources/commands/system/reboot.sh
Normal file
3
resources/commands/system/reboot.sh
Normal file
@ -0,0 +1,3 @@
|
||||
echo "Rebooting..."
|
||||
|
||||
sudo reboot
|
5
resources/commands/system/run-script.sh
Normal file
5
resources/commands/system/run-script.sh
Normal file
@ -0,0 +1,5 @@
|
||||
if ! cd __path__; then
|
||||
echo 'VITO_SSH_ERROR' && exit 1
|
||||
fi
|
||||
|
||||
__script__
|
7
resources/commands/system/upgrade.sh
Executable file
7
resources/commands/system/upgrade.sh
Executable file
@ -0,0 +1,7 @@
|
||||
sudo DEBIAN_FRONTEND=noninteractive apt clean
|
||||
|
||||
sudo DEBIAN_FRONTEND=noninteractive apt update
|
||||
|
||||
sudo DEBIAN_FRONTEND=noninteractive apt upgrade -y
|
||||
|
||||
sudo DEBIAN_FRONTEND=noninteractive apt autoremove -y
|
9
resources/commands/webserver/nginx/change-php-version.sh
Executable file
9
resources/commands/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__"
|
27
resources/commands/webserver/nginx/create-vhost.sh
Executable file
27
resources/commands/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
|
7
resources/commands/webserver/nginx/delete-site.sh
Executable file
7
resources/commands/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"
|
8
resources/commands/webserver/nginx/install-nginx.sh
Executable file
8
resources/commands/webserver/nginx/install-nginx.sh
Executable file
@ -0,0 +1,8 @@
|
||||
sudo DEBIAN_FRONTEND=noninteractive apt install nginx -y
|
||||
|
||||
if ! echo '__config__' | sudo tee /etc/nginx/nginx.conf; then
|
||||
echo 'VITO_SSH_ERROR' && exit 1
|
||||
fi
|
||||
|
||||
sudo service nginx start
|
||||
|
85
resources/commands/webserver/nginx/nginx.conf
Executable file
85
resources/commands/webserver/nginx/nginx.conf
Executable file
@ -0,0 +1,85 @@
|
||||
user __user__;
|
||||
worker_processes auto;
|
||||
pid /run/nginx.pid;
|
||||
include /etc/nginx/modules-enabled/*.conf;
|
||||
|
||||
events {
|
||||
worker_connections 768;
|
||||
# multi_accept on;
|
||||
}
|
||||
|
||||
http {
|
||||
|
||||
##
|
||||
# Basic Settings
|
||||
##
|
||||
|
||||
sendfile on;
|
||||
tcp_nopush on;
|
||||
tcp_nodelay on;
|
||||
keepalive_timeout 65;
|
||||
types_hash_max_size 2048;
|
||||
# server_tokens off;
|
||||
|
||||
# server_names_hash_bucket_size 64;
|
||||
# server_name_in_redirect off;
|
||||
|
||||
include /etc/nginx/mime.types;
|
||||
default_type application/octet-stream;
|
||||
|
||||
##
|
||||
# SSL Settings
|
||||
##
|
||||
|
||||
ssl_protocols TLSv1 TLSv1.1 TLSv1.2; # Dropping SSLv3, ref: POODLE
|
||||
ssl_prefer_server_ciphers on;
|
||||
|
||||
##
|
||||
# Logging Settings
|
||||
##
|
||||
|
||||
access_log /var/log/nginx/access.log;
|
||||
error_log /var/log/nginx/error.log;
|
||||
|
||||
##
|
||||
# Gzip Settings
|
||||
##
|
||||
|
||||
gzip on;
|
||||
|
||||
# gzip_vary on;
|
||||
# gzip_proxied any;
|
||||
# gzip_comp_level 6;
|
||||
# gzip_buffers 16 8k;
|
||||
# gzip_http_version 1.1;
|
||||
# gzip_types text/plain text/css application/json application/javascript text/xml application/xml application/xml+rss text/javascript;
|
||||
|
||||
##
|
||||
# Virtual Host Configs
|
||||
##
|
||||
|
||||
include /etc/nginx/conf.d/*.conf;
|
||||
include /etc/nginx/sites-enabled/*;
|
||||
}
|
||||
|
||||
|
||||
#mail {
|
||||
# # See sample authentication script at:
|
||||
# # http://wiki.nginx.org/ImapAuthenticateWithApachePhpScript
|
||||
#
|
||||
# # auth_http localhost/auth.php;
|
||||
# # pop3_capabilities "TOP" "USER";
|
||||
# # imap_capabilities "IMAP4rev1" "UIDPLUS";
|
||||
#
|
||||
# server {
|
||||
# listen localhost:110;
|
||||
# protocol pop3;
|
||||
# proxy on;
|
||||
# }
|
||||
#
|
||||
# server {
|
||||
# listen localhost:143;
|
||||
# protocol imap;
|
||||
# proxy on;
|
||||
# }
|
||||
#}
|
38
resources/commands/webserver/nginx/php-vhost-ssl.conf
Executable file
38
resources/commands/webserver/nginx/php-vhost-ssl.conf
Executable file
@ -0,0 +1,38 @@
|
||||
server {
|
||||
listen 80;
|
||||
listen 443 ssl;
|
||||
server_name __domain__ www.__domain__;
|
||||
root __path__/__web_directory__;
|
||||
|
||||
ssl on;
|
||||
ssl_certificate __certificate__;
|
||||
ssl_certificate_key __private_key__;
|
||||
|
||||
add_header X-Frame-Options "SAMEORIGIN";
|
||||
add_header X-Content-Type-Options "nosniff";
|
||||
|
||||
index index.php;
|
||||
|
||||
charset utf-8;
|
||||
|
||||
location / {
|
||||
try_files $uri $uri/ /index.php?$query_string;
|
||||
}
|
||||
|
||||
location = /favicon.ico { access_log off; log_not_found off; }
|
||||
location = /robots.txt { access_log off; log_not_found off; }
|
||||
|
||||
error_page 404 /index.php;
|
||||
|
||||
location ~ \.php$ {
|
||||
fastcgi_pass unix:/var/run/php/php__php_version__-fpm.sock;
|
||||
fastcgi_param SCRIPT_FILENAME $realpath_root$fastcgi_script_name;
|
||||
include fastcgi_params;
|
||||
}
|
||||
|
||||
location ~ /\.(?!well-known).* {
|
||||
deny all;
|
||||
}
|
||||
|
||||
include conf.d/__domain___redirects;
|
||||
}
|
33
resources/commands/webserver/nginx/php-vhost.conf
Executable file
33
resources/commands/webserver/nginx/php-vhost.conf
Executable file
@ -0,0 +1,33 @@
|
||||
server {
|
||||
listen 80;
|
||||
server_name __domain__ www.__domain__;
|
||||
root __path__/__web_directory__;
|
||||
|
||||
add_header X-Frame-Options "SAMEORIGIN";
|
||||
add_header X-Content-Type-Options "nosniff";
|
||||
|
||||
index index.php;
|
||||
|
||||
charset utf-8;
|
||||
|
||||
location / {
|
||||
try_files $uri $uri/ /index.php?$query_string;
|
||||
}
|
||||
|
||||
location = /favicon.ico { access_log off; log_not_found off; }
|
||||
location = /robots.txt { access_log off; log_not_found off; }
|
||||
|
||||
error_page 404 /index.php;
|
||||
|
||||
location ~ \.php$ {
|
||||
fastcgi_pass unix:/var/run/php/php__php_version__-fpm.sock;
|
||||
fastcgi_param SCRIPT_FILENAME $realpath_root$fastcgi_script_name;
|
||||
include fastcgi_params;
|
||||
}
|
||||
|
||||
location ~ /\.(?!well-known).* {
|
||||
deny all;
|
||||
}
|
||||
|
||||
include conf.d/__domain___redirects;
|
||||
}
|
31
resources/commands/webserver/nginx/phpmyadmin-vhost.conf
Executable file
31
resources/commands/webserver/nginx/phpmyadmin-vhost.conf
Executable file
@ -0,0 +1,31 @@
|
||||
server {
|
||||
listen 54331;
|
||||
server_name _;
|
||||
root /home/vito/phpmyadmin;
|
||||
|
||||
add_header X-Frame-Options "SAMEORIGIN";
|
||||
add_header X-Content-Type-Options "nosniff";
|
||||
|
||||
index index.php;
|
||||
|
||||
charset utf-8;
|
||||
|
||||
location / {
|
||||
try_files $uri $uri/ /index.php?$query_string;
|
||||
}
|
||||
|
||||
location = /favicon.ico { access_log off; log_not_found off; }
|
||||
location = /robots.txt { access_log off; log_not_found off; }
|
||||
|
||||
error_page 404 /index.php;
|
||||
|
||||
location ~ \.php$ {
|
||||
fastcgi_pass unix:/var/run/php/php__php_version__-fpm.sock;
|
||||
fastcgi_param SCRIPT_FILENAME $realpath_root$fastcgi_script_name;
|
||||
include fastcgi_params;
|
||||
}
|
||||
|
||||
location ~ /\.(?!well-known).* {
|
||||
deny all;
|
||||
}
|
||||
}
|
3
resources/commands/webserver/nginx/redirect.conf
Normal file
3
resources/commands/webserver/nginx/redirect.conf
Normal file
@ -0,0 +1,3 @@
|
||||
location __from__ {
|
||||
return __mode__ __to__;
|
||||
}
|
36
resources/commands/webserver/nginx/reverse-vhost-ssl.conf
Executable file
36
resources/commands/webserver/nginx/reverse-vhost-ssl.conf
Executable file
@ -0,0 +1,36 @@
|
||||
server {
|
||||
listen 80;
|
||||
listen 443 ssl;
|
||||
server_name __domain__ __aliases__;
|
||||
root __path__;
|
||||
|
||||
ssl on;
|
||||
ssl_certificate __certificate__;
|
||||
ssl_certificate_key __private_key__;
|
||||
|
||||
add_header X-Frame-Options "SAMEORIGIN";
|
||||
add_header X-Content-Type-Options "nosniff";
|
||||
|
||||
index index.php;
|
||||
|
||||
charset utf-8;
|
||||
|
||||
location / {
|
||||
proxy_pass http://127.0.0.1:__port__/;
|
||||
proxy_http_version 1.1;
|
||||
proxy_set_header Upgrade $http_upgrade;
|
||||
proxy_set_header Connection "upgrade";
|
||||
proxy_set_header X-Forwarded-For $remote_addr;
|
||||
}
|
||||
|
||||
location = /favicon.ico { access_log off; log_not_found off; }
|
||||
location = /robots.txt { access_log off; log_not_found off; }
|
||||
|
||||
error_page 404 /index.php;
|
||||
|
||||
location ~ /\.(?!well-known).* {
|
||||
deny all;
|
||||
}
|
||||
|
||||
include conf.d/__domain___redirects;
|
||||
}
|
31
resources/commands/webserver/nginx/reverse-vhost.conf
Executable file
31
resources/commands/webserver/nginx/reverse-vhost.conf
Executable file
@ -0,0 +1,31 @@
|
||||
server {
|
||||
listen 80;
|
||||
server_name __domain__ __aliases__;
|
||||
root __path__;
|
||||
|
||||
add_header X-Frame-Options "SAMEORIGIN";
|
||||
add_header X-Content-Type-Options "nosniff";
|
||||
|
||||
index index.php;
|
||||
|
||||
charset utf-8;
|
||||
|
||||
location / {
|
||||
proxy_pass http://127.0.0.1:__port__/;
|
||||
proxy_http_version 1.1;
|
||||
proxy_set_header Upgrade $http_upgrade;
|
||||
proxy_set_header Connection "upgrade";
|
||||
proxy_set_header X-Forwarded-For $remote_addr;
|
||||
}
|
||||
|
||||
location = /favicon.ico { access_log off; log_not_found off; }
|
||||
location = /robots.txt { access_log off; log_not_found off; }
|
||||
|
||||
error_page 404 /index.php;
|
||||
|
||||
location ~ /\.(?!well-known).* {
|
||||
deny all;
|
||||
}
|
||||
|
||||
include conf.d/__domain___redirects;
|
||||
}
|
7
resources/commands/webserver/nginx/update-redirects.sh
Normal file
7
resources/commands/webserver/nginx/update-redirects.sh
Normal file
@ -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
resources/commands/webserver/nginx/update-vhost.sh
Executable file
7
resources/commands/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
|
32
resources/commands/webserver/nginx/vhost-ssl.conf
Executable file
32
resources/commands/webserver/nginx/vhost-ssl.conf
Executable file
@ -0,0 +1,32 @@
|
||||
server {
|
||||
listen 80;
|
||||
listen 443 ssl;
|
||||
server_name __domain__ __aliases__;
|
||||
root __path__/__web_directory__;
|
||||
|
||||
ssl on;
|
||||
ssl_certificate __certificate__;
|
||||
ssl_certificate_key __private_key__;
|
||||
|
||||
add_header X-Frame-Options "SAMEORIGIN";
|
||||
add_header X-Content-Type-Options "nosniff";
|
||||
|
||||
index index.html;
|
||||
|
||||
charset utf-8;
|
||||
|
||||
location / {
|
||||
try_files $uri $uri/ /index.html;
|
||||
}
|
||||
|
||||
location = /favicon.ico { access_log off; log_not_found off; }
|
||||
location = /robots.txt { access_log off; log_not_found off; }
|
||||
|
||||
error_page 404 /index.html;
|
||||
|
||||
location ~ /\.(?!well-known).* {
|
||||
deny all;
|
||||
}
|
||||
|
||||
include conf.d/__domain___redirects;
|
||||
}
|
27
resources/commands/webserver/nginx/vhost.conf
Executable file
27
resources/commands/webserver/nginx/vhost.conf
Executable file
@ -0,0 +1,27 @@
|
||||
server {
|
||||
listen 80;
|
||||
server_name __domain__ __aliases__;
|
||||
root __path__/__web_directory__;
|
||||
|
||||
add_header X-Frame-Options "SAMEORIGIN";
|
||||
add_header X-Content-Type-Options "nosniff";
|
||||
|
||||
index index.html;
|
||||
|
||||
charset utf-8;
|
||||
|
||||
location / {
|
||||
try_files $uri $uri/ /index.html;
|
||||
}
|
||||
|
||||
location = /favicon.ico { access_log off; log_not_found off; }
|
||||
location = /robots.txt { access_log off; log_not_found off; }
|
||||
|
||||
error_page 404 /index.html;
|
||||
|
||||
location ~ /\.(?!well-known).* {
|
||||
deny all;
|
||||
}
|
||||
|
||||
include conf.d/__domain___redirects;
|
||||
}
|
27
resources/commands/website/clone-repository.sh
Executable file
27
resources/commands/website/clone-repository.sh
Executable file
@ -0,0 +1,27 @@
|
||||
echo "Host __host__-__key__
|
||||
Hostname __host__
|
||||
IdentityFile=~/.ssh/__key__" >> ~/.ssh/config
|
||||
|
||||
ssh-keyscan -H __host__ >> ~/.ssh/known_hosts
|
||||
|
||||
rm -rf __path__
|
||||
|
||||
if ! git config --global core.fileMode false; then
|
||||
echo 'VITO_SSH_ERROR' && exit 1
|
||||
fi
|
||||
|
||||
if ! git clone -b __branch__ __repo__ __path__; then
|
||||
echo 'VITO_SSH_ERROR' && exit 1
|
||||
fi
|
||||
|
||||
if ! find __path__ -type d -exec chmod 755 {} \;; then
|
||||
echo 'VITO_SSH_ERROR' && exit 1
|
||||
fi
|
||||
|
||||
if ! find __path__ -type f -exec chmod 644 {} \;; then
|
||||
echo 'VITO_SSH_ERROR' && exit 1
|
||||
fi
|
||||
|
||||
if ! cd __path__ && git config core.fileMode false; then
|
||||
echo 'VITO_SSH_ERROR' && exit 1
|
||||
fi
|
7
resources/commands/website/composer-install.sh
Executable file
7
resources/commands/website/composer-install.sh
Executable file
@ -0,0 +1,7 @@
|
||||
if ! cd __path__; then
|
||||
echo 'VITO_SSH_ERROR' && exit 1
|
||||
fi
|
||||
|
||||
if ! composer install --no-interaction --prefer-dist --optimize-autoloader --no-dev; then
|
||||
echo 'VITO_SSH_ERROR' && exit 1
|
||||
fi
|
7
resources/commands/website/update-branch.sh
Normal file
7
resources/commands/website/update-branch.sh
Normal file
@ -0,0 +1,7 @@
|
||||
if ! cd __path__; then
|
||||
echo 'VITO_SSH_ERROR' && exit 1
|
||||
fi
|
||||
|
||||
if ! git checkout -f __branch__; then
|
||||
echo 'VITO_SSH_ERROR' && exit 1
|
||||
fi
|
27
resources/commands/wordpress/install.sh
Normal file
27
resources/commands/wordpress/install.sh
Normal file
@ -0,0 +1,27 @@
|
||||
if ! curl -O https://raw.githubusercontent.com/wp-cli/builds/gh-pages/phar/wp-cli.phar; then
|
||||
echo 'VITO_SSH_ERROR' && exit 1
|
||||
fi
|
||||
|
||||
if ! chmod +x wp-cli.phar; then
|
||||
echo 'VITO_SSH_ERROR' && exit 1
|
||||
fi
|
||||
|
||||
if ! sudo mv wp-cli.phar /usr/local/bin/wp; then
|
||||
echo 'VITO_SSH_ERROR' && exit 1
|
||||
fi
|
||||
|
||||
rm -rf __path__
|
||||
|
||||
if ! wp --path=__path__ core download; then
|
||||
echo 'VITO_SSH_ERROR' && exit 1
|
||||
fi
|
||||
|
||||
if ! wp --path=__path__ core config --dbname='__db_name__' --dbuser='__db_user__' --dbpass='__db_pass__' --dbhost='__db_host__' --dbprefix='__db_prefix__'; then
|
||||
echo 'VITO_SSH_ERROR' && exit 1
|
||||
fi
|
||||
|
||||
if ! wp --path=__path__ core install --url='http://__domain__' --title="__title__" --admin_user='__username__' --admin_password="__password__" --admin_email='__email__'; then
|
||||
echo 'VITO_SSH_ERROR' && exit 1
|
||||
fi
|
||||
|
||||
print "Wordpress installed!"
|
Reference in New Issue
Block a user