Deploy `digdag` systemd file and enable `digdag`.
This commit is contained in:
parent
e4282e28d7
commit
b208ff620e
|
@ -1,7 +0,0 @@
|
|||
[program:digdag]
|
||||
command=/etc/digdag/digdag.sh
|
||||
stdout_logfile=/var/log/supervisor/digdag.log
|
||||
redirect_stderr=true
|
||||
stdout_logfile_maxbytes=1MB
|
||||
stdout_logfile_backups=5
|
||||
autorestart=true
|
|
@ -0,0 +1,15 @@
|
|||
[Unit]
|
||||
Description=digdag
|
||||
Requires=network-online.target
|
||||
After=network-online.target
|
||||
|
||||
[Service]
|
||||
Type=simple
|
||||
EnvironmentFile=-/etc/default/digdag
|
||||
Restart=on-failure
|
||||
ExecStart=/etc/digdag/digdag.sh
|
||||
KillSignal=process
|
||||
|
||||
[Install]
|
||||
WantedBy=multi-user.target
|
||||
|
|
@ -36,17 +36,15 @@ execute 'ufw reload-or-enable' do
|
|||
action :nothing
|
||||
end
|
||||
|
||||
# Deploy the config file for `supervisor`:
|
||||
remote_file '/etc/supervisor/conf.d/digdag.conf' do
|
||||
# Deploy the config file for `systemd`:
|
||||
remote_file '/lib/systemd/system/digdag.service' do
|
||||
owner 'root'
|
||||
group 'root'
|
||||
mode '644'
|
||||
|
||||
notifies :restart, 'service[supervisor]'
|
||||
end
|
||||
|
||||
service 'supervisor' do
|
||||
action :nothing
|
||||
service 'digdag' do
|
||||
action [ :enable, :restart ]
|
||||
end
|
||||
|
||||
# Deploy /etc/hosts file:
|
||||
|
|
Loading…
Reference in New Issue