r/samba-dc: Auto restart samba

Although it's rare, sometimes Samba crashes or fails to start.  When
this happens, restarting it is almost always enough to get it working
again.  Since all sorts of authentication problems can occur if one of
the domain controllers is down, it's probably best to just have systemd
automatically restart _samba.service_ if it ever stops for any reason.
frigate-exporter
Dustin 2024-07-03 10:30:20 -05:00
parent 96bc8c2c09
commit ed22f6311c
2 changed files with 20 additions and 0 deletions

View File

@ -0,0 +1,6 @@
[Unit]
StartLimitIntervalSec=60
StartLimitBurst=10
[Service]
RestartSec=10s

View File

@ -77,6 +77,20 @@
path=/etc/systemd/system/samba.service.d
mode=0755
state=directory
tags:
- systemd
- name: ensure samba service auto restart is configurd
copy:
src: auto-restart.conf
dest: /etc/systemd/system/samba.service.d
owner: root
group: root
mode: u=rw,go=r
notify:
- reload systemd
- restart samba
tags:
- systemd
- name: ensure samba starts at boot
service: