summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorDonald Webster2020-02-27 03:24:16 +0000
committerDonald Webster2020-02-27 03:24:16 +0000
commitdb8fc5dc9790af65455e93417ba78437f43f4339 (patch)
tree8c4e1423011a2d7c16974e5bd0505cc73ff36a61
parent076058c54edacadf953404ce0489f591f4e5fbbe (diff)
downloadaur-db8fc5dc9790af65455e93417ba78437f43f4339.tar.gz
Add a dump978 default file and setup the service to use it.
-rw-r--r--.SRCINFO4
-rw-r--r--PKGBUILD5
-rw-r--r--dump978.default1
-rw-r--r--dump978.service4
4 files changed, 11 insertions, 3 deletions
diff --git a/.SRCINFO b/.SRCINFO
index 160fd0548f1..71054099b7e 100644
--- a/.SRCINFO
+++ b/.SRCINFO
@@ -16,11 +16,13 @@ pkgbase = dump978-fa-git
depends = soapyrtlsdr
depends = boost-libs
source = dump978::git+git://github.com/flightaware/dump978
+ source = dump978.default
source = dump978.sysusers
source = dump978.service
sha256sums = SKIP
+ sha256sums = 95b98905c6dc330392244aee324c13900392a09088d3075b69fb08df150f6930
sha256sums = 722bd9ee0bb6dad3f15e0e8c0d92c6fe405e6670ee150f6d799f124417ea30d7
- sha256sums = 186575be1fb5c4203d85cd991cee764170570e4c804ed8376a95dc378b6af018
+ sha256sums = b6fedf9ec2e14c068f0cf45c10e2035bfee4d7fccdeb62fcd92259e66f274c52
pkgname = dump978-fa-git
diff --git a/PKGBUILD b/PKGBUILD
index 7e4f248a215..30a0c099d10 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -13,12 +13,14 @@ license=('BSD')
depends=('rtl-sdr' 'bladerf>=2.0.2' 'soapyrtlsdr' 'boost-libs')
makedepends=('git' 'boost')
source=('dump978::git+git://github.com/flightaware/dump978'
+ 'dump978.default'
'dump978.sysusers'
'dump978.service')
sha256sums=('SKIP'
+ '95b98905c6dc330392244aee324c13900392a09088d3075b69fb08df150f6930'
'722bd9ee0bb6dad3f15e0e8c0d92c6fe405e6670ee150f6d799f124417ea30d7'
- '186575be1fb5c4203d85cd991cee764170570e4c804ed8376a95dc378b6af018')
+ 'b6fedf9ec2e14c068f0cf45c10e2035bfee4d7fccdeb62fcd92259e66f274c52')
pkgver() {
cd "${srcdir}/${_gitname}"
git describe --long --tags --match=v* | sed 's/dev.//g' | sed 's/^v//;s/\([^-]*-g\)/r\1/;s/-/./g'
@@ -33,6 +35,7 @@ package() {
install -D -m 755 "${srcdir}/${_gitname}/dump978-fa" "${pkgdir}/usr/bin/dump978-fa"
install -D -m 755 "${srcdir}/${_gitname}/skyaware978" "${pkgdir}/usr/bin/skyaware978"
install -D -m 755 "${srcdir}/${_gitname}/faup978" "${pkgdir}/usr/lib/piaware/helpers/faup978"
+ install -D -m 644 dump978.default "${pkgdir}/etc/default/dump978"
install -D -m 644 dump978.sysusers "${pkgdir}/usr/lib/sysusers.d/dump978.conf"
install -D -m 644 dump978.service "${pkgdir}/usr/lib/systemd/system/dump978.service"
}
diff --git a/dump978.default b/dump978.default
new file mode 100644
index 00000000000..1b76ce26a47
--- /dev/null
+++ b/dump978.default
@@ -0,0 +1 @@
+#USER_OPTIONS="--sdr driver=rtlsdr,serial=00000123 --sdr-auto-gain --raw-port 30978 --json-port 30979"
diff --git a/dump978.service b/dump978.service
index 70b27b3c29b..dc8ce0d07e7 100644
--- a/dump978.service
+++ b/dump978.service
@@ -4,10 +4,12 @@ Wants=network-online.target
After=syslog.target network-online.target
[Service]
+User=dump978
+EnvironmentFile=/etc/default/dump978
Restart=always
RestartSec=30
RuntimeDirectory=dump978
-ExecStart=/usr/bin/dump978
+ExecStart=/usr/bin/dump978-fa $USER_OPTIONS
[Install]
Alias=dump978-fa.service