# Module Service_command

    module Service_command: sig .. end

`acquire_lock_exn slot` locks `slot`. This can be used from within another program to ensure that no server is running while, e.g., an offline backup is run.

Due to the semantics of the underlying `Lock_file.create` call, this lock is only released when the process exits. To release earlier, delete the lock file manually.

    type slot = {

`` | `lock_file : `string`;`
`` | `name : `string`;`
`` | `redirect_stdout : `Core.Std.Daemon.Fd_redirection.t`;`
`` | `redirect_stderr : `Core.Std.Daemon.Fd_redirection.t`;`

}

    module type T = sig .. end

    type t = (module Service_command.T)

    val start : t -> Core.Std.Command.t

    val stop : t -> Core.Std.Command.t

    val status : t -> Core.Std.Command.t

    val restart : t -> Core.Std.Command.t

    val group : t -> summary:string -> Core.Std.Command.t

    val acquire_lock_exn : slot -> bool

`acquire_lock_exn slot` locks `slot`. This can be used from within another program to ensure that no server is running while, e.g., an offline backup is run.

Due to the semantics of the underlying `Lock_file.create` call, this lock is only released when the process exits. To release earlier, delete the lock file manually.