if mountpoint /p &>/dev/null; then
# note, see bashrc for more documentation.
pi rss2email
- sd /etc/systemd/system/rss2email.service <<'EOF'
-[Unit]
-Description=rss2email
-After=multi-user.target
-
-[Service]
-User=iank
-Type=oneshot
-# about 24 hours of failures
-# it copies over its files without respecting symlinks, so
-# we pass options to use different location.
-
-# Todo: we should wrap this in a script which ignores
-# persistent errors about parsing html. Not reporting any errors with sysd-mail-once until then.
-# Systemd also has an output filtering mechanism, we could try that.
-ExecStart=r2e -d /p/c/rss2email.json -c /p/c/rss2email.cfg run
-#ExecStart=/usr/local/bin/sysd-mail-once -288 rss2email r2e -d /p/c/rss2email.json -c /p/c/rss2email.cfg run
-EOF
- sd /etc/systemd/system/rss2email.timer <<'EOF'
-[Unit]
-Description=rss2email
-
-[Timer]
-# for initial run. required.
-OnActiveSec=30
-# for subsequent runs.
-OnUnitInactiveSec=3000
-
-[Install]
-WantedBy=timers.target
-EOF
- sudo systemctl daemon-reload
fi
--- /dev/null
+[Unit]
+Description=rss2email
+After=multi-user.target
+
+[Service]
+User=iank
+Type=oneshot
+# about 24 hours of failures
+# it copies over its files without respecting symlinks, so
+# we pass options to use different location.
+
+# Todo: we should wrap this in a script which ignores
+# persistent errors about parsing html. Not reporting any errors with sysd-mail-once until then.
+# Systemd also has an output filtering mechanism, we could try that.
+ExecStart=r2e -d /p/c/rss2email.json -c /p/c/rss2email.cfg run
+#ExecStart=/usr/local/bin/sysd-mail-once -288 rss2email r2e -d /p/c/rss2email.json -c /p/c/rss2email.cfg run