mirror of
https://github.com/vitodeploy/vito.git
synced 2025-07-03 06:56:15 +00:00
use blade as conmmands template (#444)
* use blade as conmmands template * fix lint * fix ssl
This commit is contained in:
@ -0,0 +1,23 @@
|
||||
if ! sudo mkdir -p "$(dirname {{ $logFile }})"; then
|
||||
echo 'VITO_SSH_ERROR' && exit 1
|
||||
fi
|
||||
|
||||
if ! sudo touch {{ $logFile }}; then
|
||||
echo 'VITO_SSH_ERROR' && exit 1
|
||||
fi
|
||||
|
||||
if ! sudo chown {{ $user }}:{{ $user }} {{ $logFile }}; 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,19 @@
|
||||
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
|
@ -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,8 @@
|
||||
sudo service supervisor stop
|
||||
|
||||
sudo DEBIAN_FRONTEND=noninteractive apt-get remove supervisor -y
|
||||
|
||||
sudo rm -rf /etc/supervisor
|
||||
sudo rm -rf /var/log/supervisor
|
||||
sudo rm -rf /var/run/supervisor
|
||||
sudo rm -rf /var/run/supervisor/supervisor.sock
|
@ -0,0 +1,10 @@
|
||||
[program:{{ $name }}]
|
||||
process_name=%(program_name)s_%(process_num)02d
|
||||
command={{ $command }}
|
||||
autostart={{ $autoStart }}
|
||||
autorestart={{ $autoRestart }}
|
||||
user={{ $user }}
|
||||
numprocs={{ $numprocs }}
|
||||
redirect_stderr=true
|
||||
stdout_logfile={{ $logFile }}
|
||||
stopwaitsecs=3600
|
Reference in New Issue
Block a user