aminda-nocron-reboot.service: split duperemove and sysctl -p --system to aminda-duperemove.service & sysctl-p--system.service

This commit is contained in:
Aminda Suomalainen 2024-05-01 10:22:57 +03:00
parent aa6aad28ba
commit 6e0f72c7b1
Signed by: Mikaela
SSH Key Fingerprint: SHA256:CXLULpqNBdUKB6E6fLA1b/4SzG0HvKD19PbIePU175Q
5 changed files with 49 additions and 6 deletions

View File

@ -0,0 +1,15 @@
[Unit]
Description=Aminda's deduplication service
[Service]
Type=oneshot
TimeoutStartSec=infinity
ExecStart=-/usr/sbin/duperemove -rdhq --hashfile=/root/home.hash /home
ExecStart=-/usr/sbin/duperemove -rdhq --hashfile=/root/flatpak.hash /var/lib/flatpak
ExecStart=-/usr/sbin/duperemove -rdhq --hashfile=/root/snap.hash /var/lib/snapd
User=root
StandardOutput=journal
StandardError=journal
[Install]
WantedBy=multi-user.target

View File

@ -0,0 +1,10 @@
[Unit]
Description=Run Aminda's deduplication tasks
[Timer]
OnBootSec=0
Persistent=true
RemainAfterElapse=false
[Install]
WantedBy=timers.target

View File

@ -1,5 +1,6 @@
[Unit]
Description=Aminda's cronless boot tasks
Wants=sysctl-p--system.service
[Service]
Type=oneshot
@ -13,18 +14,12 @@ ExecStartPre=-/usr/sbin/sysctl net.ipv6.conf.all.disable_ipv6=0
ExecStartPre=-/usr/bin/systemctl start firewalld.service
# https://github.com/systemd/zram-generator
ExecStart=-/usr/bin/systemctl start /dev/zram0
# 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
# 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
#ExecStart=-/usr/sbin/duperemove -rdhq --hashfile=/root/snap.hash /var/lib/snapd
User=root
StandardOutput=journal
StandardError=journal

View File

@ -0,0 +1,13 @@
[Unit]
Description=Read /etc/sysctl.conf and /etc/sysctl.d/
[Service]
Type=oneshot
TimeoutStartSec=infinity
ExecStart=-/usr/sbin/sysctl -p --system
User=root
StandardOutput=journal
StandardError=journal
[Install]
WantedBy=multi-user.target

View File

@ -0,0 +1,10 @@
[Unit]
Description=Run reading of /etc/sysctl.conf and /etc/sysctl.d/
[Timer]
OnBootSec=0
Persistent=true
RemainAfterElapse=false
[Install]
WantedBy=timers.target