This commit is contained in:
Saeed Vaziry
2024-03-24 09:56:34 +01:00
committed by GitHub
parent 884f18db63
commit 4d051330d6
1055 changed files with 14493 additions and 20278 deletions

View 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

View 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

View File

@ -0,0 +1,5 @@
sudo DEBIAN_FRONTEND=noninteractive apt-get install supervisor -y
sudo service supervisor enable
sudo service supervisor start

View File

@ -0,0 +1,3 @@
if ! sudo supervisorctl restart __id__:*; then
echo 'VITO_SSH_ERROR' && exit 1
fi

View File

@ -0,0 +1,3 @@
if ! sudo supervisorctl start __id__:*; then
echo 'VITO_SSH_ERROR' && exit 1
fi

View File

@ -0,0 +1,3 @@
if ! sudo supervisorctl stop __id__:*; then
echo 'VITO_SSH_ERROR' && exit 1
fi

View 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