summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authordr460nf1r32021-10-15 08:59:31 +0200
committerdr460nf1r32021-10-15 08:59:31 +0200
commitefe511b0cf21c501d4f853b9cc44c90cf95b4440 (patch)
tree0c38600c7eed9f9ae1dc27bd6a78cd328928b8e6
parentabcaba0b4680f812c9ad0ebedb28de48416e8e99 (diff)
downloadaur-efe511b0cf21c501d4f853b9cc44c90cf95b4440.tar.gz
Update & use whoogle user
-rw-r--r--.gitignore2
-rw-r--r--PKGBUILD14
-rw-r--r--whoogle.conf1
-rw-r--r--whoogle.service2
4 files changed, 14 insertions, 5 deletions
diff --git a/.gitignore b/.gitignore
new file mode 100644
index 000000000000..a4b53dbebd61
--- /dev/null
+++ b/.gitignore
@@ -0,0 +1,2 @@
+*.tar.gz
+*.tar.zst
diff --git a/PKGBUILD b/PKGBUILD
index 2ae567e279da..d7fa82e29c7e 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -9,12 +9,14 @@ url="https://github.com/benbusby/whoogle-search"
license=(MIT)
depends=(python)
makedepends=(python python-pip)
-conflicts=(whoogle-git)
+conflicts=($pkgname-git)
source=("$pkgname-$pkgver.tar.gz::https://github.com/benbusby/whoogle-search/archive/refs/tags/v$pkgver.tar.gz"
- whoogle.service)
+ $pkgname.service
+ $pkgname.conf)
sha256sums=('034827d32f7acf49bb53bf5c18b5a8a9926e613b7f52d2370cb7ba3d0b33cc10'
- 'b8474f3024d310b67454b8b59977fd26b66dba3930f31604058b773e13905e49')
-install=whoogle.install
+ '7630105a0613d6758f0e298a8d197f307cb2d1657f7cedf10dc340c8f21c4511'
+ 'fe3e5b71d2d5cfcaf4a246d7a79f32a19d2240b59e761d59512fef5e711599da')
+install=$pkgname.install
prepare() {
mv $pkgname-search-$pkgver $pkgname-search
@@ -32,8 +34,12 @@ build() {
}
package() {
+ install -dm0755 "$pkgdir/usr/lib/sysusers.d/"
+ install -m0644 "$srcdir/whoogle.conf" "$pkgdir/usr/lib/sysusers.d/whoogle.conf"
+
install -dm0755 "$pkgdir/usr/lib/systemd/system/"
install -m0644 "$srcdir/whoogle.service" "$pkgdir/usr/lib/systemd/system/whoogle.service"
+
install -dm0755 "$pkgdir/opt/whoogle-search"
cp -r "$srcdir/$pkgname-search/" "$pkgdir/opt/"
}
diff --git a/whoogle.conf b/whoogle.conf
new file mode 100644
index 000000000000..02e5cae3f091
--- /dev/null
+++ b/whoogle.conf
@@ -0,0 +1 @@
+u whoogle - "Whoogle" /opt/whoogle \ No newline at end of file
diff --git a/whoogle.service b/whoogle.service
index 64edbfa6c6b3..2c0d3a300165 100644
--- a/whoogle.service
+++ b/whoogle.service
@@ -5,7 +5,7 @@ Wants=network-online.target
[Service]
Type=simple
-User=root
+User=whoogle
WorkingDirectory=/opt/whoogle-search
ExecStart=/opt/whoogle-search/venv/bin/python3 -um app --host 0.0.0.0 --port 5000
ExecReload=/bin/kill -HUP $MAINPID