Adds defragment and scrub nas services
This commit is contained in:
@@ -4,6 +4,3 @@ Description=Copies the music from Nextcloud to Navidrome
|
||||
[Service]
|
||||
Type=oneshot
|
||||
ExecStart=/root/scripts/copy-music.sh
|
||||
|
||||
[Install]
|
||||
WantedBy=multi-user.target
|
||||
|
||||
9
files/defragment-nas.service
Normal file
9
files/defragment-nas.service
Normal file
@@ -0,0 +1,9 @@
|
||||
[Unit]
|
||||
Description=Defragments the NAS
|
||||
|
||||
[Service]
|
||||
Type=oneshot
|
||||
ExecStart=btrfs filesystem defragment -r /var/mnt/nas
|
||||
|
||||
[Install]
|
||||
WantedBy=multi-user.target
|
||||
10
files/defragment-nas.timer
Normal file
10
files/defragment-nas.timer
Normal file
@@ -0,0 +1,10 @@
|
||||
[Unit]
|
||||
Description=Timer for the defragment-nas service
|
||||
|
||||
[Timer]
|
||||
OnCalendar=*-*-03 00:00:00
|
||||
Persistent=true
|
||||
Unit=defragment-nas.service
|
||||
|
||||
[Install]
|
||||
WantedBy=timers.target
|
||||
@@ -16,7 +16,7 @@ RemainAfterExit=yes
|
||||
# prevent the service from failing.
|
||||
ExecStart=/usr/bin/rpm-ostree install -y --allow-inactive firewalld fail2ban fail2ban-firewalld setroubleshoot-server setools smartmontools
|
||||
ExecStart=/bin/touch /var/lib/additional-packages.stamp
|
||||
ExecStart=/bin/systemctl enable configure-firewalld.service enable-all-quadlets.service move-downloads-nextcloud.timer copy-music.timer
|
||||
ExecStart=/bin/systemctl enable configure-firewalld.service enable-all-quadlets.service move-downloads-nextcloud.timer copy-music.timer defragment-nas.timer scrub-nas.timer
|
||||
ExecStart=semanage fcontext -a -t bin_t "/var/opt/bin(/.*)?"
|
||||
ExecStart=semanage fcontext -a -t bin_t "/root/scripts(/.*)?"
|
||||
ExecStart=restorecon -vR /var/opt/bin
|
||||
|
||||
@@ -4,6 +4,3 @@ Description=Move the completed torrents and jdownloader downloads to nextcloud
|
||||
[Service]
|
||||
Type=oneshot
|
||||
ExecStart=/root/scripts/move-downloads-nextcloud.sh
|
||||
|
||||
[Install]
|
||||
WantedBy=multi-user.target
|
||||
|
||||
6
files/scrub-nas.service
Normal file
6
files/scrub-nas.service
Normal file
@@ -0,0 +1,6 @@
|
||||
[Unit]
|
||||
Description=Scrubs the NAS
|
||||
|
||||
[Service]
|
||||
Type=oneshot
|
||||
ExecStart=btrfs scrub start /var/mnt/nas
|
||||
10
files/scrub-nas.timer
Normal file
10
files/scrub-nas.timer
Normal file
@@ -0,0 +1,10 @@
|
||||
[Unit]
|
||||
Description=Timer for the scrub-nas service
|
||||
|
||||
[Timer]
|
||||
OnCalendar=*-*-05 00:00:00
|
||||
Persistent=true
|
||||
Unit=scrub-nas.service
|
||||
|
||||
[Install]
|
||||
WantedBy=timers.target
|
||||
Reference in New Issue
Block a user