bump up method cache
[discourse_docker.git] / templates / sshd.template.yml
index 743762578d16f1edaff8826588da7e8d10fb9142..5b7f4b1a7ff641ce03b0571ab107515acc6b3e98 100644 (file)
@@ -1,19 +1,51 @@
 params:
   # SSH key is required for remote access into the container
-  ssh_key: YOUR_SSH_KEY_HERE
+  # you may also use ssh-import-id
+  ssh_key: ""
+  # so ssh-import-id works
+
+env:
+  HOME: /root
 
 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