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
|
action :nothing
|
||||||
end
|
end
|
||||||
|
|
||||||
# Deploy the config file for `supervisor`:
|
# Deploy the config file for `systemd`:
|
||||||
remote_file '/etc/supervisor/conf.d/digdag.conf' do
|
remote_file '/lib/systemd/system/digdag.service' do
|
||||||
owner 'root'
|
owner 'root'
|
||||||
group 'root'
|
group 'root'
|
||||||
mode '644'
|
mode '644'
|
||||||
|
|
||||||
notifies :restart, 'service[supervisor]'
|
|
||||||
end
|
end
|
||||||
|
|
||||||
service 'supervisor' do
|
service 'digdag' do
|
||||||
action :nothing
|
action [ :enable, :restart ]
|
||||||
end
|
end
|
||||||
|
|
||||||
# Deploy /etc/hosts file:
|
# Deploy /etc/hosts file:
|
||||||
|
|
Loading…
Reference in New Issue