1
0
mirror of https://github.com/samba-team/samba.git synced 2024-12-23 17:34:34 +03:00
samba-mirror/packaging/systemd
Andreas Schneider c97071726e packaging: Provide a systemd service file for samba-bgqd
There might be scenarios where the background queue daemon should be
running all the time instead of being started on demand. This makes
especially sense for bigger printing servers with a lot of printers. It
takes ~1 sec to get a printer from cups, so a print server with 100
printers needs 100 seconds to update the printer_list.tdb. The service
will be killed because of idle in the meantime.

BUG: https://bugzilla.samba.org/show_bug.cgi?id=15600

Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Guenther Deschner <gd@samba.org>

Autobuild-User(master): Günther Deschner <gd@samba.org>
Autobuild-Date(master): Thu Mar 14 12:19:56 UTC 2024 on atb-devel-224
2024-03-14 12:19:56 +00:00
..
ctdb.service.in ctdb-scripts: Drop uses of ctdbd_wrapper 2022-04-06 06:34:37 +00:00
nmb.service.in Drop NotifyAccess=all from systemd units 2020-05-12 10:48:39 +00:00
README packaging:systemd: Fix code spelling 2023-06-23 13:44:31 +00:00
samba-bgqd.service.in packaging: Provide a systemd service file for samba-bgqd 2024-03-14 12:19:56 +00:00
samba.conf.tmp
samba.service.in Drop NotifyAccess=all from systemd units 2020-05-12 10:48:39 +00:00
samba.sysconfig
smb.service.in Drop NotifyAccess=all from systemd units 2020-05-12 10:48:39 +00:00
winbind.service.in winbind.service: drop quotes from $WINBINDOPTIONS variable 2020-05-12 12:27:11 +00:00

With systemd the /run or /var/run are tmpfs filesystems. This means
the directories required by samba need to be created during startup.
This can be done with a config file for tmpfiles, see samba.conf.tmp.
You need to copy this file to the directory systemd-tmpfiles is looking
for its config files e.g.:

install -d -m 0755 /etc/tmpfiles.d/
install -m644 samba.conf.tmp /etc/tmpfiles.d/samba.conf

If you're a packager don't forget to run the systemd-tmpfiles binary
in the script after samba has been installed. This makes sure the
directory exists and you can start samba directly after the installation.

/usr/bin/systemd-tmpfiles --create /etc/tmpfiles.d/samba.conf