Saeed Vaziry 428140b931
refactoring (#116)
- refactoring architecture
- fix incomplete ssh logs
- code editor for scripts in the app
- remove Jobs and SSHCommands
2024-03-14 20:03:43 +01: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