summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorDavid Parrish2015-06-24 05:00:54 -0400
committerDavid Parrish2015-06-24 05:35:48 -0400
commit0671e770511c6a4b87a5e1af6f9da894fe51b2f3 (patch)
tree2ee0a8eaa5d1c5817a9e6728add284c4f0be0f19
parent2ed5342c926c3eb05fc6ad15ae64027a8e44e1c9 (diff)
downloadaur-0671e770511c6a4b87a5e1af6f9da894fe51b2f3.tar.gz
Add NXT Tor service
-rw-r--r--.SRCINFO7
-rw-r--r--PKGBUILD12
-rwxr-xr-xnrs.sh3
-rw-r--r--nxt-tor.service11
4 files changed, 26 insertions, 7 deletions
diff --git a/.SRCINFO b/.SRCINFO
index f3e91e614c7e..681494851c8d 100644
--- a/.SRCINFO
+++ b/.SRCINFO
@@ -12,17 +12,20 @@ pkgbase = nxt-git
makedepends = java-environment-openjdk=8
depends = bash
depends = java-runtime-openjdk=8
- optdepends = flashplugin: for add to clipboard support
+ optdepends = flashplugin: NRS clipboard support
optdepends = libnotify: NRS startup error notification
+ optdepends = tor: route NXT traffic through Tor
source = nxt-git::git+https://bitbucket.org/JeanLucPicard/nxt.git
source = nxt.service
+ source = nxt-tor.service
source = nxt.install
source = nrs.sh
source = nrs.desktop
sha256sums = SKIP
sha256sums = 293bf1e313677f769e4a12e6e0f78bbd58c796ebe7c34528ba50cd73bbea15a7
+ sha256sums = 87a725d1e2cf5af3554dd8d2775c94a952bc27313287777f0ca8984644f0d9b4
sha256sums = b7575397d7dd19e9b1bab75e21a433f3bdc98279ad822fe57235b830c062abca
- sha256sums = fc58e5aac478f3459686f0a9ab5e059776c1a34392391fed257e5130bfd29bc2
+ sha256sums = 24339c175f38aff974788c41d1b7db9f3df6e1e3121469cbdc6754fe75465b7b
sha256sums = 8381f120b645cca9079b5e958a8917326f71b55f031f15df3324703377638eee
pkgname = nxt-git
diff --git a/PKGBUILD b/PKGBUILD
index 850c61ddaabe..fce21764cb8b 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -9,17 +9,20 @@ url="http://nxt.org"
license=('MIT' 'GPL' 'MPL' 'APACHE')
depends=('bash' 'java-runtime-openjdk=8')
makedepends=('java-environment-openjdk=8')
-optdepends=('flashplugin: for add to clipboard support'
- 'libnotify: NRS startup error notification')
+optdepends=('flashplugin: NRS clipboard support'
+ 'libnotify: NRS startup error notification'
+ 'tor: route NXT traffic through Tor')
source=("${pkgname}::git+https://bitbucket.org/JeanLucPicard/nxt.git"
"nxt.service"
+ "nxt-tor.service"
"nxt.install"
"nrs.sh"
"nrs.desktop")
sha256sums=('SKIP'
'293bf1e313677f769e4a12e6e0f78bbd58c796ebe7c34528ba50cd73bbea15a7'
+ '87a725d1e2cf5af3554dd8d2775c94a952bc27313287777f0ca8984644f0d9b4'
'b7575397d7dd19e9b1bab75e21a433f3bdc98279ad822fe57235b830c062abca'
- 'fc58e5aac478f3459686f0a9ab5e059776c1a34392391fed257e5130bfd29bc2'
+ '24339c175f38aff974788c41d1b7db9f3df6e1e3121469cbdc6754fe75465b7b'
'8381f120b645cca9079b5e958a8917326f71b55f031f15df3324703377638eee')
install='nxt.install'
@@ -38,8 +41,9 @@ package() {
install -dm755 "$pkgdir/opt/nxt"
cp -r "${pkgname}"/* "$pkgdir"/opt/nxt/
- # Service file
+ # Service files
install -Dm644 nxt.service "$pkgdir/usr/lib/systemd/system/nxt.service"
+ install -Dm644 nxt-tor.service "$pkgdir/usr/lib/systemd/system/nxt-tor.service"
# License files
install -Dm644 "${pkgname}/COPYING.txt" "$pkgdir/usr/share/licenses/nxt/COPYING.txt"
diff --git a/nrs.sh b/nrs.sh
index d5f81ff43cd5..bf104b742c9b 100755
--- a/nrs.sh
+++ b/nrs.sh
@@ -1,6 +1,7 @@
#!/bin/bash
nxt_status=$(systemctl is-active nxt)
+nxt_tor_status=$(systemctl is-active nxt-tor)
which notify-send > /dev/null
is_libnotify_installed=$?
@@ -9,7 +10,7 @@ if [ $libnotify_installed ]; then
echo "libnotify_installed"
fi
-if [ $nxt_status != "active" ]; then
+if [ $nxt_status != "active" && $nxt_tor_status != "active" ]; then
start_nxt_message="NXT service isn't active. Try starting NXT with 'systemctl start nxt' if NRS doesn't load."
if [ $is_libnotify_installed ]; then
notify-send "NRS" "$start_nxt_message"
diff --git a/nxt-tor.service b/nxt-tor.service
new file mode 100644
index 000000000000..83a94a4e0318
--- /dev/null
+++ b/nxt-tor.service
@@ -0,0 +1,11 @@
+[Unit]
+Description=NXT Tor
+After=network.target tor.service
+Requires=tor.service
+
+[Service]
+User=nxt
+ExecStart=/usr/bin/bash -c 'cd /opt/nxt/; ./run-tor.sh'
+
+[Install]
+WantedBy=multi-user.target