Dotfiles/setup/modules/FreeipaAnsible/image/ansipa-smb.service

21 lines
679 B
INI

[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]
# multi-user.target ensures this runs on every container start.
# Before=smb.service guarantees smb.conf and the Samba user exist before smbd starts.
WantedBy=multi-user.target