systemd: aminda-nocron-rebootish.{service,timer} is a delayed variant of -ish

This commit is contained in:
Aminda Suomalainen 2024-04-26 13:16:33 +03:00
parent c55b20a89a
commit 65f58dc224
Signed by: Mikaela
SSH Key Fingerprint: SHA256:CXLULpqNBdUKB6E6fLA1b/4SzG0HvKD19PbIePU175Q
3 changed files with 33 additions and 4 deletions

View File

@ -8,18 +8,17 @@ TimeoutStartSec=infinity
# I always want DNS.
ExecStartPre=-/usr/bin/systemctl enable --now unbound.service
ExecStartPre=-/usr/bin/systemctl enable --now systemd-resolved.service
ExecStartPre=-/usr/sbin/sysctl net.ipv6.conf.all.disable_ipv6=0
# These services are called here, so
ExecStartPre=-/usr/bin/systemctl start firewalld.service
ExecStartPre=-/usr/bin/systemctl start yggdrasil.service
# Ensure /etc/sysctl.d/ gets read
ExecStart=-/usr/sbin/sysctl -p --system
# Ensure we really allow ICMPv6 on FEDORA (or firewalld)
ExecStart=-/usr/bin/firewall-cmd --add-protocol=ipv6-icmp
# 3rd party Xbox controller initialization. See Mikaela/gist/gayming/
#ExecStart=-/root/fixcontroller.py
# Another attempt at ensuring Yggdrasil works with nordvpnd
ExecStart=-/usr/sbin/sysctl net.ipv6.conf.all.disable_ipv6=0
ExecStart=-/usr/bin/systemctl restart yggdrasil.service
# This is actually in the delayed variant of this service, but anyway
ExecStart=-/usr/bin/systemctl start yggdrasil.service
# BTRFS deduplication
#ExecStart=-/usr/sbin/duperemove -rdhq --hashfile=/root/home.hash /home
#ExecStart=-/usr/sbin/duperemove -rdhq --hashfile=/root/flatpak.hash /var/lib/flatpak

View File

@ -0,0 +1,16 @@
[Unit]
Description=Aminda's cronless tasks to do a bit after booting
[Service]
Type=oneshot
TimeoutStartSec=infinity
# - means it can fail, without failing those after it
# Another attempt at ensuring Yggdrasil works with nordvpnd
ExecStartPre=-/usr/sbin/sysctl net.ipv6.conf.all.disable_ipv6=0
ExecStart=-/usr/bin/systemctl restart yggdrasil.service
User=root
StandardOutput=journal
StandardError=journal
[Install]
WantedBy=multi-user.target

View File

@ -0,0 +1,14 @@
[Unit]
Description=Run Aminda's crontab delayed boot tasks for when there is no cron
[Timer]
OnBootSec=3min
RandomizedDelaySec=2min
# User services
#OnStartupSec=5min
Persistent=true
# There is no need to stay loaded after the boot and first run.
RemainAfterElapse=false
[Install]
WantedBy=timers.target