Replace SPDY directives with HTTP/2
[discourse_docker.git] / templates / sshd.template.yml
index 327ad29eb660dc6c75f5912d44202126a5f80fe8..5b7f4b1a7ff641ce03b0571ab107515acc6b3e98 100644 (file)
@@ -9,17 +9,43 @@ env:
 
 run:
 
+  - replace:
+      filename: /etc/pam.d/sshd
+      from: "session    required     pam_loginuid.so"
+      to: ""
+
+
   - file:
      path: /etc/service/sshd/run
      chmod: "+x"
      contents: |
-        #!/bin/sh
+        #!/bin/bash
         exec 2>&1
         exec /usr/sbin/sshd -D -e
 
+  - file:
+     path: /etc/runit/3.d/99-ssh
+     chmod: "+x"
+     contents: |
+       #!/bin/bash
+       sv stop sshd
+
   - exec:
       hook: sshd
       cmd:
         - mkdir -p /var/run/sshd
         - mkdir -p /root/.ssh
-        - echo $ssh_key >> /root/.ssh/authorized_keys
+        - echo "$ssh_key" >> /root/.ssh/authorized_keys
+        - echo "$$ENV_SSH_PUB_KEY" >> /root/.ssh/authorized_keys
+        - chmod 640 /root/.ssh/authorized_keys
+        - rm /etc/update-motd.d/00-header
+        - rm /etc/update-motd.d/10-help-text
+        - rm /etc/legal
+  - file:
+     path: /etc/update-motd.d/00-discourse
+     chmod: +x
+     contents: |
+        #!/bin/sh
+        echo
+        echo Welcome to Discourse Docker
+        echo