aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSean Whitton <spwhitton@spwhitton.name>2021-07-13 19:38:55 -0700
committerSean Whitton <spwhitton@spwhitton.name>2021-07-13 19:38:55 -0700
commit82804c132bc959f1f6e560957942da826fbc17de (patch)
tree79c443fe77998bab7cd57148c95b5887c31180b6
parent350be6c791db8c943b284d8e53d768a1a2a1ee50 (diff)
downloadconsfigurator-82804c132bc959f1f6e560957942da826fbc17de.tar.gz
SSHD:CONFIGURED: when configuration is changed, restart ssh daemon
Signed-off-by: Sean Whitton <spwhitton@spwhitton.name>
-rw-r--r--src/package.lisp3
-rw-r--r--src/property/sshd.lisp5
2 files changed, 6 insertions, 2 deletions
diff --git a/src/package.lisp b/src/package.lisp
index 7cc2a71..fd9e422 100644
--- a/src/package.lisp
+++ b/src/package.lisp
@@ -552,7 +552,8 @@
(:local-nicknames (#:re #:cl-ppcre)
(#:os #:consfigurator.property.os)
(#:file #:consfigurator.property.file)
- (#:apt #:consfigurator.property.apt))
+ (#:apt #:consfigurator.property.apt)
+ (#:service #:consfigurator.property.service))
(:export #:installed
#:configured
#:no-passwords
diff --git a/src/property/sshd.lisp b/src/property/sshd.lisp
index 9fb6f2d..c1a969b 100644
--- a/src/property/sshd.lisp
+++ b/src/property/sshd.lisp
@@ -30,7 +30,10 @@
"Set key--value pairs in /etc/ssh/sshd_config."
(:desc (format nil "sshd configured ~{~A ~A~^, ~}" pairs))
(:apply
- (apply #'file:contains-conf-space "/etc/ssh/sshd_config" pairs)))
+ (if (eql :no-change
+ (apply #'file:contains-conf-space "/etc/ssh/sshd_config" pairs))
+ :no-change
+ (service:reloaded "sshd"))))
(defprop no-passwords :posix ()
"Configure SSH to disallow password logins.