Vous ne pouvez pas sélectionner plus de 25 sujets Les noms de sujets doivent commencer par une lettre ou un nombre, peuvent contenir des tirets ('-') et peuvent comporter jusqu'à 35 caractères.

26 lines
914B

  1. #!/bin/bash
  2. # Set consumption directory
  3. mkdir -p ${PAPERLESS_CONSUMPTION_DIR}
  4. # create FTP user
  5. useradd -d ${PAPERLESS_CONSUMPTION_DIR} -p `openssl passwd -1 ${PAPERLESS_FTP_PWD}` ${PAPERLESS_FTP_USER}
  6. chown ${PAPERLESS_FTP_USER} ${PAPERLESS_CONSUMPTION_DIR}
  7. chmod 777 ${PAPERLESS_CONSUMPTION_DIR}
  8. # Copy Server Host key if any (this is needed at least for Brother ADS-2400n)
  9. if [[ -s ${PAPERLESS_CONSUMPTION_DIR}/ssh_host_rsa_key.pub ]]; then
  10. cp ${PAPERLESS_CONSUMPTION_DIR}/ssh_host_rsa_key.pub /etc/ssh/;
  11. fi
  12. if [[ -s ${PAPERLESS_CONSUMPTION_DIR}/ssh_host_rsa_key ]]; then
  13. cp ${PAPERLESS_CONSUMPTION_DIR}/ssh_host_rsa_key /etc/ssh/;
  14. fi
  15. sed -i 's/#HostKey \/etc\/ssh\/ssh_host_rsa_key/HostKey \/etc\/ssh\/ssh_host_rsa_key/g' /etc/ssh/sshd_config
  16. echo "HostKeyAlgorithms ssh-rsa" >> /etc/ssh/sshd_config
  17. # https://bugs.launchpad.net/ubuntu/+source/openssh/+bug/45234
  18. mkdir -p /var/run/sshd
  19. exec "$@"