Hi bud, you’re a genius
just added "rockpi-sata.service mnt-raidx.mount " to my After=
Minidlna folders and it worked without any alterations by default (regarding minidlna and samba)
" You can get a a mount path escaped version (which is used in a systemd service) with the systemd-escape --path <path_goes_here> (without <>) command is your mount path has a complicated name.
1. Example (simple):
pi@raspberry-pi-4:~ $ systemd-escape --path /mnt/radix
mnt-radix
2. Example (with a space in the folder name):
pi@raspberry-pi-4:~ $ systemd-escape --path “/mnt/radix 2”
mnt-radix\x202
So you have to write After=mnt-radix\x202.mount into the service file in this case."
What does this mean?
I just want qbittorrent minidlna and samba to all run after my raid as loaded nothing more nothing less
this is what my current folder looks like
"# This file is part of systemd.
systemd is free software; you can redistribute it and/or modify it
under the terms of the GNU Lesser General Public License as published by
the Free Software Foundation; either version 2.1 of the License, or
(at your option) any later version.
[Unit]
DefaultDependencies=no
Conflicts=umount.target
After=rockpi-sata.service
Before=local-fs.target umount.target
[Mount]
What=UUID=“3c3a3c08-2aff-4bd6-a68c-5ad8eddb2123”
What=/dev/md0
Type=ext4
Options=defaults,noatime
Make ‘systemctl enable mnt-raidx.mount’ work:
[Install]
WantedBy=local-fs.target
"
"[Unit]
Description=Samba SMB Daemon
Documentation=man:smbd(8) man:samba(7) man:smb.conf(5)
Wants=network-online.target
After=network.target network-online.target nmbd.service winbind.service rockpi-sata.service mnt-raidx.mount
[Service]
Type=notify
NotifyAccess=all
PIDFile=/var/run/samba/smbd.pid
LimitNOFILE=16384
EnvironmentFile=-/etc/default/samba
ExecStartPre=/usr/share/samba/update-apparmor-samba-profile
ExecStart=/usr/sbin/smbd --foreground --no-process-group $SMBDOPTIONS
ExecReload=/bin/kill -HUP $MAINPID
LimitCORE=infinity
[Install]
WantedBy=multi-user.target
"
"[Unit]
Description=MiniDLNA lightweight DLNA/UPnP-AV server
Documentation=man:minidlnad(1) man:minidlna.conf(5)
After=network.target rockpi-sata.service mnt-raidx.mount
[Service]
Type=forking
User=minidlna
Group=minidlna
Environment=CONFIGFILE=/etc/minidlna.conf
Environment=DAEMON_OPTS=-r
EnvironmentFile=-/etc/default/minidlna
RuntimeDirectory=minidlna
LogsDirectory=minidlna
PIDFile=/run/minidlna/minidlna.pid
ExecStart=/usr/sbin/minidlnad -f $CONFIGFILE -P /run/minidlna/minidlna.pid $DAEMON_OPTS
[Install]
WantedBy=multi-user.target
"