dropbear.service 675 B

1234567891011121314151617181920212223
  1. [Unit]
  2. Description=Dropbear SSH daemon
  3. After=syslog.target network.target auditd.service
  4. [Service]
  5. # If /etc/dropbear is not a directory, and
  6. # - the filesystem is RO (i.e. we can not rm the symlink),
  7. # create the directory pointed to by the symlink.
  8. # - the filesystem is RW (i.e. we can rm the symlink),
  9. # replace the symlink with an actual directory
  10. ExecStartPre=/bin/sh -c '\
  11. if ! [ -d /etc/dropbear ]; then \
  12. if rm -f /etc/dropbear; then \
  13. mkdir -p /etc/dropbear; \
  14. else \
  15. mkdir -p $(readlink /etc/dropbear); \
  16. fi; \
  17. fi'
  18. ExecStart=/usr/sbin/dropbear -F -R
  19. ExecReload=/bin/kill -HUP $MAINPID
  20. [Install]
  21. WantedBy=multi-user.target