2023-08-04 18:28:04 +02:00

28 lines
640 B
Bash
Executable File

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