Switch from Systemd to Enit

This commit is contained in:
2025-03-12 13:25:30 +02:00
parent de741d8b89
commit 6157db67c1
5 changed files with 24 additions and 33 deletions
+5
View File
@@ -0,0 +1,5 @@
name: ssh-keygen
description: Generate SSH keys
type: simple
start_cmd: /usr/bin/ssh-keygen -A
exit_method: kill
-12
View File
@@ -1,12 +0,0 @@
[Unit]
Description=Generate sshd keys
Before=ssh.server
[Service]
Type=oneshot
ExecStart=/usr/bin/ssh-keygen -A
RemainAfterExit=true
StandardOutput=journal
[Install]
WantedBy=multi-user.target
+6
View File
@@ -0,0 +1,6 @@
name: sshd
description: OpenSSH Daemon
type: background
start_cmd: /sbin/sshd -D
exit_method: kill
restart: true
-11
View File
@@ -1,11 +0,0 @@
[Unit]
Description=OpenSSH Daemon
[Service]
ExecStart=/usr/sbin/sshd -D
ExecReload=/bin/kill -HUP $MAINPID
KillMode=process
Restart=always
[Install]
WantedBy=multi-user.target
+13 -10
View File
@@ -35,16 +35,19 @@ check() {
# This function is used to move the compiled files into the output directory # This function is used to move the compiled files into the output directory
package() { package() {
make DESTDIR="$BPM_OUTPUT" install make DESTDIR="$BPM_OUTPUT" install
install -v -m755 contrib/ssh-copy-id "$BPM_OUTPUT"/usr/bin
install -v -m644 contrib/ssh-copy-id.1 "$BPM_OUTPUT"/usr/share/man/man1 install -m755 contrib/ssh-copy-id "$BPM_OUTPUT"/usr/bin
mkdir -p "$BPM_OUTPUT"/etc/pam.d install -m644 contrib/ssh-copy-id.1 "$BPM_OUTPUT"/usr/share/man/man1
cp ../sshd-pam "$BPM_OUTPUT"/etc/pam.d/sshd
cp ../sshd_config "$BPM_OUTPUT"/etc/ssh/sshd_config install -Dm644 "$BPM_WORKDIR"/sshd-pam "$BPM_OUTPUT"/etc/pam.d/sshd
mkdir -p "$BPM_OUTPUT"/usr/lib/systemd/system/
cp ../sshd.service "$BPM_OUTPUT"/usr/lib/systemd/system/sshd.service install -Dm644 "$BPM_WORKDIR"/sshd_config "$BPM_OUTPUT"/etc/ssh/sshd_config
cp ../sshd-keygen.service "$BPM_OUTPUT"/usr/lib/systemd/system/sshd-keygen.service
install -Dm644 "$BPM_WORKDIR"/sshd.esv "$BPM_OUTPUT"/etc/esvm/services/sshd.esv
install -Dm644 "$BPM_WORKDIR"/ssh-keygen.esv "$BPM_OUTPUT"/etc/esvm/services/ssh-keygen.esv
install -v -m755 -d "$BPM_OUTPUT"/usr/share/doc/openssh install -v -m755 -d "$BPM_OUTPUT"/usr/share/doc/openssh
install -v -m644 INSTALL LICENCE OVERVIEW README* "$BPM_OUTPUT"/usr/share/doc/openssh install -v -m644 INSTALL LICENCE OVERVIEW README* "$BPM_OUTPUT"/usr/share/doc/openssh
mkdir -p "$BPM_OUTPUT"/usr/share/licenses/openssh
cp LICENCE "$BPM_OUTPUT"/usr/share/licenses/openssh/LICENSE install -Dm644 LICENCE "$BPM_OUTPUT"/usr/share/licenses/openssh/LICENSE
} }