diff options
author | Vinit Agnihotri <vagnihotri@ddn.com> | 2022-03-01 17:24:06 +1100 |
---|---|---|
committer | Amitay Isaacs <amitay@samba.org> | 2022-04-06 06:34:37 +0000 |
commit | 93824b8c331cd43fea1d22a2d110e4e27fb0a02e (patch) | |
tree | 0938005f08dda5770461603562f238254a806412 /packaging | |
parent | 2f6b31788bbb853ace48e0e52813bb1b8c4feec2 (diff) | |
download | samba-93824b8c331cd43fea1d22a2d110e4e27fb0a02e.tar.gz |
packaging: move CTDB service file to top-level
Signed-off-by: Vinit Agnihotri <vagnihotri@ddn.com>
Reviewed-by: Martin Schwenke <martin@meltin.net>
Reviewed-by: Amitay Isaacs <amitay@gmail.com>
Diffstat (limited to 'packaging')
-rw-r--r-- | packaging/systemd/ctdb.service.in | 19 | ||||
-rw-r--r-- | packaging/wscript | 7 | ||||
-rw-r--r-- | packaging/wscript_build | 6 |
3 files changed, 32 insertions, 0 deletions
diff --git a/packaging/systemd/ctdb.service.in b/packaging/systemd/ctdb.service.in new file mode 100644 index 00000000000..4494f914cff --- /dev/null +++ b/packaging/systemd/ctdb.service.in @@ -0,0 +1,19 @@ +[Unit] +Description=CTDB +Documentation=man:ctdbd(1) man:ctdb(7) +After=network-online.target time-sync.target +ConditionFileNotEmpty=@CTDB_ETCDIR@/nodes + +[Service] +Type=forking +LimitCORE=infinity +LimitNOFILE=1048576 +TasksMax=4096 +PIDFile=@CTDB_RUNDIR@/ctdbd.pid +ExecStart=@SBINDIR@/ctdbd_wrapper start +ExecStop=@SBINDIR@/ctdbd_wrapper stop +KillMode=control-group +Restart=no + +[Install] +WantedBy=multi-user.target diff --git a/packaging/wscript b/packaging/wscript index 1f9a54a787d..ab8e16f1ab9 100644 --- a/packaging/wscript +++ b/packaging/wscript @@ -41,10 +41,17 @@ def options(opt): +" 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 diff --git a/packaging/wscript_build b/packaging/wscript_build index fbcd4e55f8c..217bd996348 100644 --- a/packaging/wscript_build +++ b/packaging/wscript_build @@ -12,5 +12,11 @@ for srv in systemd_services: 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') |