Minor cleanup
This commit is contained in:
parent
b01315f998
commit
14687558fe
@ -265,7 +265,11 @@ service "mastodon-streaming" do
|
|||||||
action [:enable, :start]
|
action [:enable, :start]
|
||||||
end
|
end
|
||||||
|
|
||||||
# Delete old media cache
|
#
|
||||||
|
# Delete cached remote media older than 30 days
|
||||||
|
# Will be re-fetched if necessary
|
||||||
|
#
|
||||||
|
|
||||||
systemd_unit 'mastodon-delete-old-media-cache.service' do
|
systemd_unit 'mastodon-delete-old-media-cache.service' do
|
||||||
content({
|
content({
|
||||||
Unit: {
|
Unit: {
|
||||||
@ -273,12 +277,12 @@ systemd_unit 'mastodon-delete-old-media-cache.service' do
|
|||||||
},
|
},
|
||||||
Service: {
|
Service: {
|
||||||
Type: "oneshot",
|
Type: "oneshot",
|
||||||
WorkingDirectory: "#{mastodon_path}",
|
WorkingDirectory: mastodon_path,
|
||||||
Environment: "\"RAILS_ENV=#{rails_env}\"",
|
Environment: "RAILS_ENV=#{rails_env}",
|
||||||
ExecStart: "#{bundle_path} exec bin/tootctl media remove --days 30",
|
ExecStart: "#{bundle_path} exec bin/tootctl media remove --days 30",
|
||||||
SyslogIdentifier: "mastodon-delete-old-media-cache"
|
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
triggers_reload true
|
||||||
action [:create]
|
action [:create]
|
||||||
end
|
end
|
||||||
|
|
||||||
@ -292,10 +296,9 @@ systemd_unit 'mastodon-delete-old-media-cache.timer' do
|
|||||||
Persistent: 'true'
|
Persistent: 'true'
|
||||||
},
|
},
|
||||||
Install: {
|
Install: {
|
||||||
WantedBy: 'timers.target'
|
WantedBy: 'timer.target'
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
|
||||||
triggers_reload true
|
triggers_reload true
|
||||||
action [:create, :enable, :start]
|
action [:create, :enable, :start]
|
||||||
end
|
end
|
||||||
|
Loading…
x
Reference in New Issue
Block a user