Description=CTDB
Documentation=man:ctdbd(1) man:ctdb(7)
After=network-online.target time-sync.target
-ConditionFileNotEmpty=/etc/ctdb/nodes
+ConditionFileNotEmpty=@CTDB_ETCDIR@/nodes
[Service]
Type=forking
LimitCORE=infinity
LimitNOFILE=1048576
TasksMax=4096
-PIDFile=/run/ctdb/ctdbd.pid
-ExecStart=/usr/sbin/ctdbd_wrapper start
-ExecStop=/usr/sbin/ctdbd_wrapper stop
+PIDFile=@CTDB_RUNDIR@/ctdbd.pid
+ExecStart=@SBINDIR@/ctdbd_wrapper start
+ExecStop=@SBINDIR@/ctdbd_wrapper stop
KillMode=control-group
Restart=no
+" Can be used multiple times."),
action="append", dest="systemd_samba_extra", default=[])
+ gr.add_option('--systemd-ctdb-extra',
+ metavar="Option=Value",
+ help=("Extra directives added to the ctdb service file."
+ +" Can be given multiple times."),
+ action="append", dest="systemd_ctdb_extra", default=[])
+
def configure(conf):
conf.env.systemd_install_services = Options.options.systemd_install_services
conf.env.systemd_smb_extra = '\n'.join(Options.options.systemd_smb_extra)
conf.env.systemd_nmb_extra = '\n'.join(Options.options.systemd_nmb_extra)
conf.env.systemd_winbind_extra = '\n'.join(Options.options.systemd_winbind_extra)
conf.env.systemd_samba_extra = '\n'.join(Options.options.systemd_samba_extra)
+ conf.env.systemd_ctdb_extra = '\n'.join(Options.options.systemd_ctdb_extra)
conf.env.SYSTEMDDIR = Options.options.SYSTEMDDIR
if bld.env.systemd_install_services:
bld.INSTALL_FILES(bld.env.SYSTEMDDIR, srv, flat=True)
+if bld.env.with_ctdb:
+ srv = 'systemd/ctdb.service'
+ bld.CONFIGURE_FILE(srv)
+ if bld.env.systemd_install_services:
+ bld.INSTALL_FILES(bld.env.SYSTEMDDIR, srv, flat=True)
+
if bld.env.systemd_install_services:
bld.INSTALL_FILES('${SYSCONFDIR}/sysconfig', 'systemd/samba.sysconfig', destname='samba')