summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorMantas Mikulėnas2015-08-10 00:05:22 +0300
committerMantas Mikulėnas2015-08-10 00:05:22 +0300
commit5cc40165606caa7f7a784c33359dc573db981b4e (patch)
treea22b94f0d517b17ed76f5c09a7eea5193c5518a3
downloadaur-5cc40165606caa7f7a784c33359dc573db981b4e.tar.gz
initial import
-rw-r--r--.SRCINFO23
-rw-r--r--PKGBUILD60
-rw-r--r--binkd.conf517
-rw-r--r--binkd.install7
-rw-r--r--binkd.service9
-rw-r--r--binkd.socket9
-rw-r--r--binkd.tmpfiles1
-rw-r--r--binkd@.service6
8 files changed, 632 insertions, 0 deletions
diff --git a/.SRCINFO b/.SRCINFO
new file mode 100644
index 000000000000..d136e4c23078
--- /dev/null
+++ b/.SRCINFO
@@ -0,0 +1,23 @@
+pkgbase = binkd
+ pkgdesc = Binkley protocol daemon for transferring files between Fidonet systems
+ pkgver = 1.0.4
+ pkgrel = 1
+ url = http://binkd.grumbler.org/
+ install = binkd.install
+ arch = i686
+ arch = x86_64
+ license = GPL
+ backup = etc/binkd/binkd.conf
+ source = ftp://happy.kiev.ua/pub/fidosoft/mailer/binkd/binkd-1.0.4.tar.gz
+ source = binkd.service
+ source = binkd@.service
+ source = binkd.socket
+ source = binkd.tmpfiles
+ sha256sums = 917e45c379bbd1a140d1fe43179a591f1b2ec4004b236d6e0c4680be8f1a0dc0
+ sha256sums = 3f2ddf00b1552ad90a7320c7d904afab13fb2de525568190c80c7d87f67cc0c8
+ sha256sums = 2ebaebb7b525f9eaa1915dfeabba1626422d300f9820981225509203e6dcbc59
+ sha256sums = 2ddcb26a54f7a0f9a8ab5d8819431fb1f2bd961169c6fe5e7afa7f4c89e11786
+ sha256sums = 5032916082884a938978f0d5168fd053baab230bd34e84008ae637515e04a685
+
+pkgname = binkd
+
diff --git a/PKGBUILD b/PKGBUILD
new file mode 100644
index 000000000000..c0b6744b70d3
--- /dev/null
+++ b/PKGBUILD
@@ -0,0 +1,60 @@
+# Contributor: Lex Rivera aka x-demon <aur@x-demon.org>
+# Contributor: Mantas Mikulėnas <grawity@gmail.com>
+
+pkgname=binkd
+pkgver=1.0.4
+pkgrel=1
+pkgdesc="Binkley protocol daemon for transferring files between Fidonet systems"
+arch=('i686' 'x86_64')
+url="http://binkd.grumbler.org/"
+license=('GPL')
+backup=("etc/binkd/binkd.conf")
+source=("ftp://happy.kiev.ua/pub/fidosoft/mailer/$pkgname/$pkgname-$pkgver.tar.gz"
+ "binkd.service"
+ "binkd@.service"
+ "binkd.socket"
+ "binkd.tmpfiles")
+install="binkd.install"
+sha256sums=('917e45c379bbd1a140d1fe43179a591f1b2ec4004b236d6e0c4680be8f1a0dc0'
+ '3f2ddf00b1552ad90a7320c7d904afab13fb2de525568190c80c7d87f67cc0c8'
+ '2ebaebb7b525f9eaa1915dfeabba1626422d300f9820981225509203e6dcbc59'
+ '2ddcb26a54f7a0f9a8ab5d8819431fb1f2bd961169c6fe5e7afa7f4c89e11786'
+ '5032916082884a938978f0d5168fd053baab230bd34e84008ae637515e04a685')
+
+build() {
+ cd "$srcdir/$pkgname-$pkgver"
+ cp mkfls/unix/{Makefile*,configure*,install-sh,mkinstalldirs} .
+ ./configure \
+ --prefix=/usr \
+ --sbindir=/usr/bin \
+ --mandir=/usr/share/man \
+ --sysconfdir=/etc \
+ --with-debug \
+ --with-zlib \
+ ;
+ make
+}
+
+package() {
+ cd "$srcdir/$pkgname-$pkgver"
+ make DESTDIR="$pkgdir" install
+
+ mv "$pkgdir/usr/sbin" "$pkgdir/usr/bin"
+
+ ln -sf "binkd-$pkgver" "$pkgdir/usr/bin/binkd"
+
+ install -dm0755 "$pkgdir/etc/binkd"
+ mv "$pkgdir/etc/binkd.conf-dist" "$pkgdir/etc/binkd/binkd.conf"
+
+ for dir in inbound{,-temp,-unsecure} outbound/fidonet longbox personalboxes nodelist; do
+ mkdir -p "$pkgdir/var/spool/ftn/$dir"
+ done
+
+ cd "$srcdir"
+ install -Dm0644 binkd.service "$pkgdir/usr/lib/systemd/system/binkd.service"
+ install -Dm0644 binkd@.service "$pkgdir/usr/lib/systemd/system/binkd@.service"
+ install -Dm0644 binkd.socket "$pkgdir/usr/lib/systemd/system/binkd.socket"
+ install -Dm0644 binkd.tmpfiles "$pkgdir/usr/lib/tmpfiles.d/binkd.conf"
+}
+
+# vim: ts=2:sw=2:et
diff --git a/binkd.conf b/binkd.conf
new file mode 100644
index 000000000000..43bb136adbe5
--- /dev/null
+++ b/binkd.conf
@@ -0,0 +1,517 @@
+# Binkd sample configuration file
+# Copyright (C) 1996-1997 by Dima Maloff, 2:5047/13
+# $Id: binkd.conf,v 1.3 2012/01/22 13:54:12 green Exp $
+
+#
+# Path and name for the logfile, loglevel
+#
+log /var/log/binkd/binkd
+loglevel 6
+
+#
+# Your FTN domains:
+# domain <name> <main-outbound> <default-zone> [<root-domain>]
+# or
+# domain <new-name> alias-for <name>
+# First specified domain sets as default domain for the 3D/4D addresses.
+#
+domain fidonet /var/spool/ftn/outbound/fidonet 2
+#
+# Aliases to support known wrong 5D configurations
+domain fido alias-for fidonet
+domain fidorus alias-for fidonet
+domain fido7 alias-for fidonet
+#
+# Aliases to support known DNS domain zones
+# (some people is mix up the terms "FTN domain" and "DNS internet domain")
+domain fidonet.org alias-for fidonet
+domain fidonet.net alias-for fidonet
+
+
+#
+# Your addresses, 5D or 4D or 3D:
+# address <addr1> ...
+# If first address specified as 3D/4D then domain for it sets from domain
+# defined in the first "domain" token. If second and more addresses specified
+# as 3D/4D then domain sets from first address.
+#
+address 2:5047/999@fidonet 2:5020/999.1@fidonet
+
+#
+# Hide or present the specified AKAs if remote AKAs match the address mask
+# hide-aka <my-aka> [!]<mask>
+# present-aka <add-aka> [!]<mask>
+# Mask is compared to the 5d-form of address string, `*' matches any number
+# of any symbols (so you have to write '2:5020/*' but not '5020/*')
+# Use `!' to invert the mask
+# These rules apply in the same order as in config, you can present any address
+#
+#hide-aka 2:5020/999.* !2:*@fidonet # hide aka from all but fido zone 2
+#present-aka 2:5047/999.1 2:5047/*.0* # present aka to all nodes in 2:5047
+
+#
+# The name of your system, its location and your name
+#
+sysname "Ivan's BBS"
+location "Magadan, Russia"
+sysop "Ivan Ivanov"
+
+#
+# System capabilities
+#
+nodeinfo 115200,TCP,BINKP
+
+#
+# Uncomment it if you want binkd's log at your console
+#
+conlog 4
+
+#
+# If a log message matches one of these masks it won't be written to log
+# (masks are in shell/glob style, case-insensitive)
+#
+#nolog "*socket # [0-9]*"
+#nolog "*.[bc]sy"
+
+#
+# Uncomment if you want T-Mail(FrontDoor)-style binary log
+# (Will work and have sense on PCs only?)
+#
+#binlog binkd.sts
+#fdinhist in.his
+#fdouthist out.his
+
+#
+# TCP settings. Leave this unchanged if not sure.
+#
+# Suffixes for time intervals are w for weeks, d for days,
+# h for hours, m for minutes, s or no suffix for seconds.
+# You can mix the suffixes, i.e. 1d12h is the same as 36h.
+#
+#iport binkp
+#oport binkp
+#oblksize 4096
+#timeout 5m
+#connect-timeout 5m
+#bindaddr 192.168.0.3
+
+#
+# Zlib compression parameters (if built with zlib support)
+# zlevel - compression level (zlib only, bzlib2 uses 100kb always),
+# set to 0 to use default value of 6
+# zminsize <size> - files smaller than <size> won't be compressed anyway
+# Rules:
+# zallow <mask1>[ <mask2>... <maskN>] - allow compression for the masks
+# zdeny <mask1>[ <mask2>... <maskN>] - deny compression for the masks
+# If remote accepts compressed blocks (OPT GZ) its name will be checked
+# against these rules before sending each file. If the name matches a zallow
+# rule the file will be sent with compression. If the name matches a zdeny rule
+# it will be sent as-is. The rule matched first is applied. If a file doesn't
+# match any rule zdeny is assumed.
+#
+#zminsize 1024
+#
+#zallow *.pkt
+#zdeny *.su? *.mo? *.tu? *.we? *.th? *.fr? *.sa?
+#zdeny *.zip *.rar *.arj *.ha *.gz *.tgz *.bz2 *.z[0-9][0-9] *.r[0-9][0-9]
+#zallow *
+
+#
+# Compression dll names, for win32 versions built with ZLIBDL
+#
+#zlib-dll zlib.dll
+#bzlib2-dll bzlib2.dll
+
+#
+# HTTPS or SOCKS settings.
+#
+# proxy 192.168.0.3:3128 # <- regular http/https proxy (i.e. squid)
+# proxy 192.168.0.3:3128/user/password # <- proxy required username/password
+# # (as in browser)
+#
+# proxy 192.168.0.3:3128/user/password/your_host/your_domain
+# ^- proxy required NTLM authorization with username/password
+# your_host -- Windows host name without domain (i.e. MY_HOST)
+# your_domain -- Windows domain name (not FQDN, i.e. DEFAULT_DOMAIN)
+#
+# socks 192.168.0.3:1080 # <- socks4 proxy
+# socks 192.168.0.3:1080/ # <- socks5 proxy without authorization
+# socks 192.168.0.3:1080/user/password # <- socks5 proxy with username/password
+# # (RFC-1929)
+
+#
+# Delay of calls and outbound rescans in seconds
+#
+#call-delay 1m
+#rescan-delay 1m
+
+#
+# Max. number of inbound/outbound connections
+#
+#maxservers 2
+#maxclients 2
+
+#
+# Binkd will try to call a node N times. If failed it will
+# hold the node for S seconds. The feature is off by default.
+#
+try 10
+hold 10m
+
+#
+# hold-skipped <S>
+# Binkd will hold for S seconds all mail skipped by a node. (Def. -- 1h)
+#
+#hold-skipped 1h
+
+#
+# Don't send (only receive) files if no password for an inbound session
+#
+send-if-pwd
+
+# Tzoff corrects UTC time returned by time() under DOS-derived OS
+# Using system TZ variable or tzselect(8) is preferred.
+#tzoff 3h
+
+#
+# Use syslog (Only if made with -DHAVE_VSYSLOG and -DHAVE_FACILITYNAMES)
+#
+#syslog local0
+
+#
+# Print percents while sending or receiving
+#
+percents
+
+#
+# List queue after rescans
+#
+printq
+
+#
+# Perform reverse resolving (for logging only)
+#
+backresolv
+
+#
+# Log pid:
+#
+pid-file /var/run/ftn/binkd.pid
+
+#
+# Map paths in flo's:
+# ftrans <old-string> <new-string>
+# Use as many ftrans's as you want.
+#
+#ftrans "D:\\fido\\outbound" "/var/spool/fido/outb"
+#ftrans "\\" "/" # this replaces all slashes in a path
+
+#
+# Inbound directories for secure and non-secure links
+#
+inbound /var/spool/ftn/inbound
+inbound-nonsecure /var/spool/ftn/inbound-unsecure
+
+#
+# Directory for incomplete receiving files (.hr and .dt),
+# default to inbound for the node
+#
+temp-inbound /var/spool/ftn/inbound-temp
+
+#
+# Binkd will skip all files from a node if
+# size_of_the_next_file_for_us_there + minfree < free_space_in_inbound
+# The zero value and the value 4294967295 (2**32-1) is equivalented to infinity.
+#
+minfree 2048
+minfree-nonsecure 2048
+
+#
+# When trying to receive a new file: remove partial files with this
+# name but different size or time from inbound. (If commented out, binkd
+# will left old parts as .dt and .hr in the inbound directory)
+#
+kill-dup-partial-files
+
+#
+# Remove all old partial files from inbound. (OFF if commented out)
+# kill-old-partial-files <max-age-in-seconds>
+#
+kill-old-partial-files 1d
+
+#
+# Remove old .bsy/.csy files (If some are left after a system crash). It would
+# be wise to set this to 12h on almost any system. (Note that binkd always
+# touches .bsy's/.csy's for active sessions)
+#
+# kill-old-bsy is OFF by default.
+#
+kill-old-bsy 12h
+
+#
+# Create a flag file after receiving a file
+#
+#flag toss!.now *.pkt
+#flag toss!.now *.su? *.mo? *.tu? *.we? *.th? *.fr? *.sa?
+
+#
+# Run an external program.
+# The "*S" macro in command line substed with S.R.I.F., see !SRIF.TXT
+# The "!" before program pathname means immediate program execution
+# after receiving the file.
+# *** win32 only:
+# The "@" before program pathname means execute program in separate console
+# The "@@" before program pathname means execute program in hidden console
+# ***
+# Macros: *F - complete name of received file,
+# *A0..*A9 - first 10 AKA of remote system,
+# *A*, *A@ - list of all remote AKA separated by spaces
+# *P - password protected [0|1],
+# *L - listed system [0|1]
+# *H - remote hostname or IP,
+# *N - short file name (win32 only).
+#
+#exec "my-freq-processor /options *S" *.req
+#exec "my-pkt-unpacker /options *S" *.pkt
+#exec "my-tosser /options" c:\\bbs\\inbound\\????????.[mwtfs][oehrau][0-9a-zA-Z]
+#exec "nice -n 19 hpt toss link" /var/spool/ftn/inbound/*.[STFWMstfwm][ouaherOUAHER][0-9A-Za-z] *.[pP][kK][tT]
+
+#
+# Include a file
+#
+#include /etc/ftn/binkd.inc
+
+#
+# Overrides root domain for DNS lookups, see `node' below.
+#
+#root-domain fidonet.net
+
+#
+# Scan T-Mail boxes (short and long)
+#
+#filebox d:\\fido\\tmail\\boxes
+
+#
+# Scan theBrake! long boxes
+#
+#brakebox d:\\fido\\brake\\boxes
+brakebox /var/spool/ftn/longbox
+
+#
+# Should binkd delete empty boxes?
+# Uncomment the following line, if yes
+#
+#deletebox
+
+#
+# Scan node outbound while connecting and send mail size to remote
+#
+prescan
+
+# t-mail or ifcico (qico) password file.
+# Format of the password file:
+# [password] <FTN address> <inpwd>[,[<pktpwd>][,<outpwd>]]
+# where:
+# [password] optional "password" token;
+# <FTN address> address of a link in the form 1:2/3.4@domain
+# or 1:2/3@domain or 1:2/3 or 1:2/3.4;
+# <inpwd> password for incoming sessions;
+# <pktpwd> packet password, used when "share" token
+# is handled;
+# <outpwd> password for outgoing sessions.
+# Any password is one word without spaces or tabs. If <pktpwd> or <outpwd>
+# is omitted, it is assumed equal to <inpwd>. If a password is defined for
+# a node by the "node" token then the passwords for the node in the password
+# file are ignored.
+#
+#passwords /etc/ftn/passwords
+
+#
+# Skip files:
+# skip [all|listed|unlisted|secure|unsecure] [!]<sizeKb>|- <mask>...
+#
+# 'all' applies to all sessions (default)
+# 'listed' applies to sessions with the nodes defined by 'node' keyword
+# 'secure' applies to password-protected sessions
+#
+# Use '!' before size for destructive skip, default is non-destructive one.
+# If <size> > 0 then only files larger than <size> in kilobytes are skipped,
+# zero <size> applies to all files,
+# if <size> is set to '-' then the rule allows any file by <mask>'s
+#
+# <mask> is a shell-style mask, case-insensitive (except for symbols in [])
+# multiple masks for a rule are permitted
+#
+# Policy for rule processing is first-match
+#
+#skip all 0 *.mp3 *.avi
+#skip unsecure 256 *.pkt
+#skip unsecure !0 *
+
+#
+# Overwrite the existing file by the new received,
+# do not save with the changed extension
+#
+#overwrite net_*.*
+
+#
+# Inbound filename case:
+# inboundcase [save(default)|upper|lower|mixed]
+#
+# 'save' don't change filename case (default)
+# 'upper' uppercase filename (FILE-NAME.EXT)
+# 'lower' lowercase filename (file-name.ext)
+# 'mixed' make filename pretty (File-Name.Ext)
+#
+# * tested only with english filenames
+#
+#inboundcase save
+
+#
+# Should binkd send empty files?
+# dont-send-empty [no(default)|arcmail|yes]
+#
+# 'no' inhibit only sending *.?ut (netmail) with size <=60 bytes
+# 'arcmail' do not send zero-size arcmail and pkt <= 60 bytes
+# 'yes' do not send all zero-size files and pkt <= 60 bytes
+#
+#dont-send-empty no
+
+#
+# Should binkd delete empty point dirs in BSO?
+# Uncomment the following line, if yes
+#
+#deletedirs
+
+#
+# Use Amiga Style Outbound (ASO)
+#
+#aso
+
+#
+# Limit bandwidth (rate):
+# limit-rate [all|listed|unlisted|secure|unsecure] <rate>[kM%]|- <mask>...
+#
+# <rate> is a max allowed rate in bytes-per-second (k=kbytes, M=Mbytes),
+# if % is specified, the node -bw rate is multiplied by this value
+# in percents, if - then rate is unlimited
+# <mask> is a filename mask to apply this rule to
+#
+# limit-rate rules are checked in the order they appear in config, first
+# matcing rule is applied
+#
+# IMPORTANT! If a node has no explicitly defined bandwidth limit, the
+# defnode's limit is used. If defnode has no limit, rate is unlimited.
+#
+#limit-rate unsecure - *.pkt
+#limit-rate unsecure 2k *
+
+# Define shared aka
+# Add a shared-address as aka for any node from this list, so that
+# uncompessed netmail for shared aka will be sent in the first session with
+# any node listed in shares; packet header will be updated to match this
+# node's main aka and pkt password
+# share <shared-address> <node1> [<node2> ...]
+# example:
+#share 2:999/999 2:5020/52 2:5020/238
+
+#
+# Check the sender's address in incoming pkt's, change the file extension
+# to <ext>, if the check failed
+# check-pkthdr [all|secure|unsecure|listed|unlisted] <ext>
+#
+# 'all' applies to all nodes
+# 'listed' applies, if at least one aka is defined by 'node' keyword
+# 'secure' applies, if at least one aka is password-protected
+#
+# It's ok to specify .<ext> as well as <ext> - the dot before ext is ignored
+# Flag order: -nohc (for any aka), -hc (for any aka), check-pkthdr flag
+#
+#check-pkthdr secure .sec
+
+#
+# Define a link:
+# node [[z:]n/]n[.p][@domain] [-nr|-nd] [-md] [-hc|-nohc] [-ip|-sip] [-bw <send_rate>[/<recv_rate>]] [-4|-6] [{hosts|-} [{<inpwd>[,[<pktpwd>][,<outpwd>]]|-} [flavour [{obox|-} [{ibox|-}]]]]]
+#
+# * All non-"-" fields will redefine the values specified for the same node
+# earlier in config.
+# * The meaning of <inpwd>, <pktpwd> and <outpwd> is the same as in
+# the description of the "passwords" token. Any password is one word
+# without spaces or tabs. If <pktpwd> or <outpwd> is omitted, it is
+# assumed equal to <inpwd>.
+# * Flavour is one of i, c, d, -, h; and is the flavour for the outbound
+# filebox ("obox").
+# * Binkd sends from obox all non-dir entries NOT matching ".*" wildcard.
+# EVERY TIME YOU PUT A FILE INTO OBOX CHECK IF BINKD WILL BE ABLE TO
+# UNLINK IT. Otherwise, the session will never end.
+# * Default for ibox is inbound or inbound-nosecure depending on the pwd field.
+# * Default for port is oport.
+# * `-nr' stands for `Not Reliable Link', this works only on outbound calls
+# with another binkp/1.1 mailer. The option solves the only problem with
+# binkd having no enough time to start receiving of a file from
+# non-zero offset before IP link's down, so don't use it unless you
+# have this problem -- really not effective
+# * `-nd' means "No Dupe Mode", this works only on outbound calls with
+# another binkd 0.9.3 or higher. The option solves problem with
+# duplicating files while losts carrier but link is a bit slower
+# then with "-nr" option
+# * `-md' means "Must have CRAM-MD5". This works only with nodes with
+# binkd or argus supported this method. Do not set it if your link
+# can use the old version of binkd.
+# * `-nomd' - do not use CRAM-MD5 for this node (send plain text password)
+# * `-hc' enables check of sender address in pkt header for this node/aka
+# (overrides the setting of the 'check-pkthdr' statement)
+# * `-nohc' disables check of sender address in pkt header for this node/aka
+# (overrides the setting of the 'check-pkthdr' statement)
+# * `-ip' means "Remote IP check". In this case the node will be
+# rejected, if it comes not from one of its IP-addresses.
+# Remote AKAs with bad IP-address will be dropped on outgoing calls.
+# * `-sip' means "Strict remote IP check". Like "-ip", but node will be
+# rejected, if no IP-addresses allowed ("-" or not resolved).
+# Remote AKAs with bad IP-address will be dropped on outgoing calls.
+# * `-bw' specifies bandwidth (rate) limit for this node
+# if one value is specified, it's used as both send and recv limit
+# if two values are specified, first is for send and second - for recv
+# rate values are expected to be in format `<rate>[kM%]|-'
+# (see limit-rate keyword for detailed description)
+# * `-noproxy' disables usage of proxy/socks server when calling this node
+# (node expected to be inside local network)
+# * `-4' only connect via IPv4
+# * `-6' only connect via IPv6
+# * Hosts is a list in form
+# host1[:port1][;host2[:port2]] ...
+# * Asterisk (`*') in the host list forces Binkd to perform
+# 1:2/3.4 --> p4.f3.n2.z1.fidonet.net translation for a node's
+# Fido-address and lookup IP for the resulting FQDN in DNS.
+# Root domain part ("fidonet.net") can be changed with root-domain
+# keyword.
+#
+#node 5047/888 - password
+#node 5047/999 -md hostname;* password i /var/spool/ftn/personalboxes/to999 /var/spool/ftn/personalboxes/from999
+
+#
+# Default node flags. Binkd will call an unlisted node if "defnode" defined.
+#
+defnode -nd *
+
+#
+# Perl hooks file (if built with Perl)
+#
+#perl-hooks test.pl
+
+#
+# Perl DLL file (only matters if compiled with PERLDL=1 for Win32)
+#
+#perl-dll perl56.dll
+
+#
+# binkd will refuse to start, if perl-hooks script has compilation errors
+# Note, that run-time errors still can occur
+#
+#perl-strict
+
+#
+# This variables can be used in perl hooks as $cfg{"name"}
+# Syntax: perl-var <name> <value>
+#
+#perl-var nodelist /var/lib/ftn/nodelist/nodelist.[0-9][0-9][0-9]
diff --git a/binkd.install b/binkd.install
new file mode 100644
index 000000000000..21644f66a19f
--- /dev/null
+++ b/binkd.install
@@ -0,0 +1,7 @@
+post_install() {
+ systemd-tmpfiles --create binkd.conf
+}
+
+post_upgrade() {
+ post_install
+}
diff --git a/binkd.service b/binkd.service
new file mode 100644
index 000000000000..e8206fb21436
--- /dev/null
+++ b/binkd.service
@@ -0,0 +1,9 @@
+[Unit]
+Description=Binkley Protocol server
+
+[Service]
+ExecStart=/usr/bin/binkd /etc/binkd/binkd.conf
+ExecReload=/bin/kill -HUP $MAINPID
+
+[Install]
+WantedBy=multi-user.target
diff --git a/binkd.socket b/binkd.socket
new file mode 100644
index 000000000000..6e4ca5e0007c
--- /dev/null
+++ b/binkd.socket
@@ -0,0 +1,9 @@
+[Unit]
+Description=Binkley Protocol socket
+
+[Socket]
+ListenStream=24554
+Accept=yes
+
+[Install]
+WantedBy=sockets.target
diff --git a/binkd.tmpfiles b/binkd.tmpfiles
new file mode 100644
index 000000000000..1b103a7a2b1c
--- /dev/null
+++ b/binkd.tmpfiles
@@ -0,0 +1 @@
+d /run/binkd 755 root root -
diff --git a/binkd@.service b/binkd@.service
new file mode 100644
index 000000000000..e23f8a15b481
--- /dev/null
+++ b/binkd@.service
@@ -0,0 +1,6 @@
+[Unit]
+Description=Binkley Protocol server
+
+[Service]
+ExecStart=/usr/bin/binkd /etc/binkd/binkd.conf -i
+ExecReload=/bin/kill -HUP $MAINPID