Update docstrings
This commit is contained in:
parent
9c857ef8a9
commit
dc76c16a2e
1 changed files with 15 additions and 1 deletions
|
@ -203,7 +203,15 @@ Takes OPTION as an argument and prints its description."
|
||||||
(or (cdr (assoc alias mk/remote/*host-aliases*)) alias))
|
(or (cdr (assoc alias mk/remote/*host-aliases*)) alias))
|
||||||
|
|
||||||
(defun mk/remote/--systemctl-service (alias service command)
|
(defun mk/remote/--systemctl-service (alias service command)
|
||||||
"Start a systemd SERVICE on a remote HOST."
|
"Execute a systemctl COMMAND on a systemd SERVICE on a remote host identified by ALIAS.
|
||||||
|
|
||||||
|
ALIAS is a string that specifies the remote host; it can be an
|
||||||
|
alias defined in `mk/remote/*host-aliases*'.
|
||||||
|
|
||||||
|
SERVICE is the name of the systemd service to operate on.
|
||||||
|
|
||||||
|
COMMAND is the systemctl command to execute on the service (e.g.,
|
||||||
|
'start', 'stop', 'status')."
|
||||||
(let* ((host (mk/remote/--get-real-host alias))
|
(let* ((host (mk/remote/--get-real-host alias))
|
||||||
(buffer (generate-new-buffer (format "*%s-%s-%s*" alias service command)))
|
(buffer (generate-new-buffer (format "*%s-%s-%s*" alias service command)))
|
||||||
(process-name (format "systemctl-%s-%s" command service))
|
(process-name (format "systemctl-%s-%s" command service))
|
||||||
|
@ -217,6 +225,12 @@ Takes OPTION as an argument and prints its description."
|
||||||
:sentinel sentinel)))
|
:sentinel sentinel)))
|
||||||
|
|
||||||
(defmacro mk/remote/define-systemctl-functions (&rest actions)
|
(defmacro mk/remote/define-systemctl-functions (&rest actions)
|
||||||
|
"Dynamically create functions to interact with systemd services on a remote host.
|
||||||
|
|
||||||
|
Each function will be named `mk/remote/ACTION-service', where
|
||||||
|
ACTION is one of the symbols in ACTIONS. The functions will take
|
||||||
|
an ALIAS and SERVICE as arguments and call
|
||||||
|
`mk/remote/--systemctl-service' accordingly."
|
||||||
`(progn
|
`(progn
|
||||||
,@(mapcar
|
,@(mapcar
|
||||||
(lambda (action)
|
(lambda (action)
|
||||||
|
|
Loading…
Add table
Reference in a new issue