summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorWebDawg2016-10-09 17:26:18 -0600
committerWebDawg2016-10-09 17:26:18 -0600
commit569e289778309c456a3f0e9ffbd074440996d188 (patch)
treea822e0cf8f09837eaea1ee357c517ca435ef7809
parent767fd43c293d8e471b354bc09cc05b89cbd73b8a (diff)
downloadaur-569e289778309c456a3f0e9ffbd074440996d188.tar.gz
more services
-rw-r--r--.SRCINFO10
-rw-r--r--PKGBUILD13
-rwxr-xr-xStartNutchServerRest.bash (renamed from StartNutchServer.bash)0
-rwxr-xr-xStartNutchServerWebApp.bash3
-rw-r--r--nutch-rest.service (renamed from nutch.service)4
-rw-r--r--nutch-webapp.service14
-rw-r--r--nutch.install24
7 files changed, 53 insertions, 15 deletions
diff --git a/.SRCINFO b/.SRCINFO
index 54000ff77ce1..fe24bc359624 100644
--- a/.SRCINFO
+++ b/.SRCINFO
@@ -10,14 +10,18 @@ pkgbase = nutch
depends = java-runtime-headless>=8
options = !strip
source = https://archive.apache.org/dist/nutch/2.3.1/apache-nutch-2.3.1-src.tar.gz
- source = nutch.service
source = https://archive.apache.org/dist/nutch/2.3.1/apache-nutch-2.3.1-src.tar.gz.asc
- source = StartNutchServer.bash
+ source = nutch-rest.service
+ source = nutch-webapp.service
+ source = StartNutchServerRest.bash
+ source = StartNutchServerWebApp.bash
validpgpkeys = DB7B5199121C08A5C8F4052B3A4717F048BAEBF6
sha512sums = 6abae11990f4bd6c71e06105e05c976fcc67e2829387863f052a66492e538fbe41ca095c891ca726c0b85c6ff27d153f89cb40fcb73830d48fd1de706179055f
- sha512sums = 75833fa0f9768d87a05117f66f47fbdb5ab0269660f17ed325a4ce127d12b8c6dd6dda6ea3f562ddd2928330d736da62c3d4a6bfd42430b8632b38f577cfce3b
sha512sums = e0f0b587c4a5759181779cb5721fde83479dd31387aa76b0e377c486eb46e94290b35299670eea2bf8bea5c2d5ce312328994604d55cb5f6458f3d8eb563a262
+ sha512sums = 6bd806037b1d15ec57b991ddf2ff02b57b983abb864140ca753689fa963b22a6553c99b4b2bd10faf82780fc511ab5b4ba257cbbaf731c9a2a5d702084e8eb3d
+ sha512sums = 4b5455dd395ce01be17ab6ed79cd764e68307ba606d104df2843982d86c77a3ddea8aba48736fe9627233124fd8dabaf55b160eb6a044889263b8b0bec5dd69d
sha512sums = dd8b89087eb33e32faea757bf22556aa0e31c200f74953dfa1b1251429a2d7a5c84f6ce1294b1c7560fe26d87833d581d07df346297b3fb003dae3e7408017ad
+ sha512sums = 256db0d75cc15bda5114032392f8d62755e8ecda0d08114326cd4ddfcd6b17ec0ccdc1e6eb6905cdb6d3a118220ac4157941c61d03cbb07f2604c03f3d242360
pkgname = nutch
diff --git a/PKGBUILD b/PKGBUILD
index 6713924b72b8..3a275c21fde9 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -46,9 +46,12 @@ makedepends=(
# current url syntax: http://archive.apache.org/dist/nutch/2.3.1/apache-nutch-2.3.1-src.tar.gz
source=("https://archive.apache.org/dist/$pkgname/$pkgver/apache-$pkgname-$pkgver-src.tar.gz"
- "nutch.service"
"https://archive.apache.org/dist/$pkgname/$pkgver/apache-$pkgname-$pkgver-src.tar.gz.asc"
- "StartNutchServer.bash")
+ "nutch-rest.service"
+ "nutch-webapp.service"
+ "StartNutchServerRest.bash"
+ "StartNutchServerWebApp.bash"
+ )
# I am keeping this here to remind me about the future
# backup=(opt/solr/server/etc/jetty{,-http,-https,-ssl}.xml
@@ -60,9 +63,11 @@ install="$pkgname.install"
options=(!strip)
sha512sums=('6abae11990f4bd6c71e06105e05c976fcc67e2829387863f052a66492e538fbe41ca095c891ca726c0b85c6ff27d153f89cb40fcb73830d48fd1de706179055f'
- '75833fa0f9768d87a05117f66f47fbdb5ab0269660f17ed325a4ce127d12b8c6dd6dda6ea3f562ddd2928330d736da62c3d4a6bfd42430b8632b38f577cfce3b'
- 'e0f0b587c4a5759181779cb5721fde83479dd31387aa76b0e377c486eb46e94290b35299670eea2bf8bea5c2d5ce312328994604d55cb5f6458f3d8eb563a262'
+ 'e0f0b587c4a5759181779cb5721fde83479dd31387aa76b0e377c486eb46e94290b35299670eea2bf8bea5c2d5ce312328994604d55cb5f6458f3d8eb563a262'
+ '6bd806037b1d15ec57b991ddf2ff02b57b983abb864140ca753689fa963b22a6553c99b4b2bd10faf82780fc511ab5b4ba257cbbaf731c9a2a5d702084e8eb3d'
+ '4b5455dd395ce01be17ab6ed79cd764e68307ba606d104df2843982d86c77a3ddea8aba48736fe9627233124fd8dabaf55b160eb6a044889263b8b0bec5dd69d'
'dd8b89087eb33e32faea757bf22556aa0e31c200f74953dfa1b1251429a2d7a5c84f6ce1294b1c7560fe26d87833d581d07df346297b3fb003dae3e7408017ad'
+ '256db0d75cc15bda5114032392f8d62755e8ecda0d08114326cd4ddfcd6b17ec0ccdc1e6eb6905cdb6d3a118220ac4157941c61d03cbb07f2604c03f3d242360'
)
build() {
cd "$srcdir/apache-$pkgname-$pkgver"
diff --git a/StartNutchServer.bash b/StartNutchServerRest.bash
index 7e74dc76c7dd..7e74dc76c7dd 100755
--- a/StartNutchServer.bash
+++ b/StartNutchServerRest.bash
diff --git a/StartNutchServerWebApp.bash b/StartNutchServerWebApp.bash
new file mode 100755
index 000000000000..7978f73ada4f
--- /dev/null
+++ b/StartNutchServerWebApp.bash
@@ -0,0 +1,3 @@
+#!/usr/bin/env bash
+export JAVA_HOME=$(readlink -f /usr/bin/java | sed "s:bin/java::")
+/opt/nutch/bin/nutch webapp
diff --git a/nutch.service b/nutch-rest.service
index bd30170cb750..e8398233a960 100644
--- a/nutch.service
+++ b/nutch-rest.service
@@ -1,5 +1,5 @@
[Unit]
-Description=Nutch open source web crawler
+Description=Nutch open source web crawler rest api
After=network.target
[Service]
@@ -8,7 +8,7 @@ User=nutch
Group=nutch
PrivateTmp=true
WorkingDirectory=/opt/nutch
-ExecStart=/opt/nutch/bin/StartNutchServer.bash
+ExecStart=/opt/nutch/bin/StartNutchServerRest.bash
[Install]
WantedBy=multi-user.target
diff --git a/nutch-webapp.service b/nutch-webapp.service
new file mode 100644
index 000000000000..c232b73c1265
--- /dev/null
+++ b/nutch-webapp.service
@@ -0,0 +1,14 @@
+[Unit]
+Description=Nutch open source web crawler webapp
+After=network.target
+
+[Service]
+Type=simple
+User=nutch
+Group=nutch
+PrivateTmp=true
+WorkingDirectory=/opt/nutch
+ExecStart=/opt/nutch/bin/StartNutchServerWebApp.bash
+
+[Install]
+WantedBy=multi-user.target
diff --git a/nutch.install b/nutch.install
index 006fe9f75d55..8e97681bf6a5 100644
--- a/nutch.install
+++ b/nutch.install
@@ -1,14 +1,26 @@
print_core_message() {
cat <<EOT
-To use the nutch restful API
-which you really do not HAVE to do
-as the software can just be run
-by itself you will have to
-Start the nutch service first!
- $ sudo systemctl restart nutch
+3 Options:
+Use the nutch cli and run against it
+
+or to use the nutch restful API
+
+Start the nutch-rest service
+ $ sudo systemctl restart nutch-rest
This basically runs
nutch nutchserver
but generates java home first
+
+There is also a Web Based Config tool
+ $ sudo systemctl restart nutch-webapp
+This basically runs
+ nutch webapp
+but generates java home first
+
+Port Defaults:
+8081 for rest api
+8080 for web based config tool
+
EOT
}