+ subscribes :run, "execute[/opt/planet-dump-ng/configure]"
+end
+
+directory "/store/planetdump" do
+ owner "www-data"
+ group "www-data"
+ mode "755"
+ recursive true
+end
+
+%w[planetdump planet-mirror-redirect-update].each do |program|
+ template "/usr/local/bin/#{program}" do
+ source "#{program}.erb"
+ owner "root"
+ group "root"
+ mode "755"
+ end
+end
+
+systemd_service "planetdump@" do
+ description "Planet dump for %i"
+ user "www-data"
+ exec_start "/usr/local/bin/planetdump %i"
+ memory_max "64G"
+ private_tmp true
+ private_devices true
+ private_network true
+ protect_system "full"
+ protect_home true
+ no_new_privileges true
+end
+
+cron_d "planet-dump-mirror" do
+ minute "*/10"
+ user "www-data"
+ command "/usr/local/bin/planet-mirror-redirect-update"
+ mailto "horntail-www-data-cron@firefishy.com"