mirror of
https://github.com/vitodeploy/vito.git
synced 2025-07-01 05:56:16 +00:00
refactoring (#116)
- refactoring architecture - fix incomplete ssh logs - code editor for scripts in the app - remove Jobs and SSHCommands
This commit is contained in:
@ -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
|
@ -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
app/SSH/Services/ProcessManager/scripts/supervisor/install-supervisor.sh
Executable file
5
app/SSH/Services/ProcessManager/scripts/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
|
@ -0,0 +1,3 @@
|
||||
if ! sudo supervisorctl restart __id__:*; then
|
||||
echo 'VITO_SSH_ERROR' && exit 1
|
||||
fi
|
@ -0,0 +1,3 @@
|
||||
if ! sudo supervisorctl start __id__:*; then
|
||||
echo 'VITO_SSH_ERROR' && exit 1
|
||||
fi
|
@ -0,0 +1,3 @@
|
||||
if ! sudo supervisorctl stop __id__:*; then
|
||||
echo 'VITO_SSH_ERROR' && exit 1
|
||||
fi
|
@ -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
|
Reference in New Issue
Block a user