From 57ee01929ad9f0f384ec8e210b8f22b605fd3641 Mon Sep 17 00:00:00 2001 From: Jonathan McCrohan Date: Thu, 20 Feb 2014 02:14:10 +0000 Subject: [PATCH] Add systemd unit files Signed-off-by: Jonathan McCrohan --- README.md | 4 ++-- systemd/nyancat.socket | 9 +++++++++ systemd/nyancat@.service | 12 ++++++++++++ 3 files changed, 23 insertions(+), 2 deletions(-) create mode 100644 systemd/nyancat.socket create mode 100644 systemd/nyancat@.service diff --git a/README.md b/README.md index db73410..413b22f 100644 --- a/README.md +++ b/README.md @@ -28,8 +28,8 @@ To use the telnet server, you need to add a configuration that runs: nyancat -t -We recommend `openbsd-inetd`, but `xinetd` will work as well, and you should be -able to use any other compatible `inetd` flavor. +We recommend `openbsd-inetd`, but both `xinetd` and `systemd` work as well. You +should be able to use any other compatible `inetd` flavor too. ## Distribution Specific Information diff --git a/systemd/nyancat.socket b/systemd/nyancat.socket new file mode 100644 index 0000000..7d61b82 --- /dev/null +++ b/systemd/nyancat.socket @@ -0,0 +1,9 @@ +[Unit] +Description=nyancat socket + +[Socket] +ListenStream=23 +Accept=true + +[Install] +WantedBy=sockets.target diff --git a/systemd/nyancat@.service b/systemd/nyancat@.service new file mode 100644 index 0000000..79c16c1 --- /dev/null +++ b/systemd/nyancat@.service @@ -0,0 +1,12 @@ +[Unit] +Description=nyancat +Documentation=man:nyancat(1) + +[Service] +User=nobody +ExecStart=-/usr/bin/nyancat -t +StandardInput=socket +StandardOutput=socket + +[Install] +WantedBy=multi-user.target