[Unit] Description=Ansipa Scan Results SMB Share Setup # Run before smb so smb.conf and the Samba user exist when smbd starts. Before=smb.service After=network.target [Service] Type=oneshot RemainAfterExit=yes # SMB_SCAN_PASSWORD comes from the container environment on first boot. # On subsequent restarts it is read from /data/samba/ansipa-smb.env by the script. PassEnvironment=SMB_SCAN_PASSWORD ExecStart=/usr/local/sbin/ansipa-smb-setup.sh StandardOutput=journal StandardError=journal [Install] WantedBy=smb.service