This commit is contained in:
Toke Høiland-Jørgensen 2020-01-03 02:09:57 +01:00 committed by GitHub
commit d7aa4fd9fd
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 19 additions and 1 deletions

11
dropbear.service Normal file
View file

@ -0,0 +1,11 @@
[Unit]
Description=Dropbear SSH Daemon
DefaultDependencies=no
Before=cryptsetup.target
[Service]
Type=simple
ExecStart=/usr/bin/dropbear -F -s -j -k
[Install]
WantedBy=cryptsetup.target

View file

@ -86,7 +86,14 @@ build ()
add_dir "/var/log"
touch "${BUILDROOT}"/var/log/lastlog
#systemd enabled
declare -F add_systemd_unit > /dev/null 2>&1
if [ $? -eq 0 ]; then
add_file "/usr/share/mkinitcpio-dropbear/dropbear.service" "/etc/systemd/system/dropbear.service"
systemctl --root "$BUILDROOT" enable dropbear.service
else
add_runscript
fi
}
help ()