[aur-dev] [PATCH] Add systemd unit files for the AUR sshd
Lukas Fleischer
archlinux at cryptocrack.de
Mon Dec 29 12:42:47 UTC 2014
Signed-off-by: Lukas Fleischer <archlinux at cryptocrack.de>
---
INSTALL | 7 +++++--
conf/aur-sshd.socket | 6 ++++++
conf/aur-sshd at .service | 8 ++++++++
3 files changed, 19 insertions(+), 2 deletions(-)
create mode 100644 conf/aur-sshd.socket
create mode 100644 conf/aur-sshd at .service
diff --git a/INSTALL b/INSTALL
index b198997..72e7539 100644
--- a/INSTALL
+++ b/INSTALL
@@ -37,6 +37,9 @@ Setup on Arch Linux
# useradd -U -d /srv/http/aur -c 'AUR user' aur
# chown aur:aur /srv/http/aur/.ssh/
-8) Run the sshd as the new user.
+8) Add, enable and start systemd unit files for the new sshd:
- $ /srv/http/aur/openssh/sshd -f /srv/http/aur/.ssh/sshd_config
+ # cp /srv/http/aur/conf/aur-sshd.socket /etc/systemd/system/
+ # cp /srv/http/aur/conf/aur-sshd at .service /etc/systemd/system/
+ # systemctl enable aur-sshd.socket
+ # systemctl start aur-sshd.socket
diff --git a/conf/aur-sshd.socket b/conf/aur-sshd.socket
new file mode 100644
index 0000000..5b0c3df
--- /dev/null
+++ b/conf/aur-sshd.socket
@@ -0,0 +1,6 @@
+[Socket]
+ListenStream=2222
+Accept=yes
+
+[Install]
+WantedBy=sockets.target
diff --git a/conf/aur-sshd at .service b/conf/aur-sshd at .service
new file mode 100644
index 0000000..e29c292
--- /dev/null
+++ b/conf/aur-sshd at .service
@@ -0,0 +1,8 @@
+[Unit]
+Description=AUR OpenSSH Per-Connection Daemon
+
+[Service]
+ExecStart=-/srv/http/aur/openssh/sshd -i -f /srv/http/aur/.ssh/sshd_config
+User=aur
+StandardInput=socket
+StandardError=syslog
--
2.2.1
More information about the aur-dev
mailing list