summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authordr460nf1r32021-10-21 13:13:37 +0200
committerdr460nf1r32021-10-21 13:13:37 +0200
commit0d845a2c9bcb5eddd7c6541d3ada44cb7c465447 (patch)
tree33121ef5b21c7b92432bd8d793f89418a4d24f90
parent919e9338e0018537aa209098b3ff7af5beed6c9c (diff)
downloadaur-0d845a2c9bcb5eddd7c6541d3ada44cb7c465447.tar.gz
Fix permission issues?
-rw-r--r--PKGBUILD7
-rw-r--r--whoogle.install12
-rw-r--r--whoogle.service3
3 files changed, 10 insertions, 12 deletions
diff --git a/PKGBUILD b/PKGBUILD
index c1a3223e8cff..71a9b547a521 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -2,7 +2,7 @@
pkgname=whoogle
pkgver=0.6.0
-pkgrel=3
+pkgrel=5
pkgdesc='A self-hosted, ad-free, privacy-respecting metasearch engine'
arch=(x86_64 aarch64)
url="https://github.com/benbusby/whoogle-search"
@@ -17,7 +17,7 @@ source=("$pkgname-$pkgver.tar.gz::https://github.com/benbusby/whoogle-search/arc
sha256sums=('034827d32f7acf49bb53bf5c18b5a8a9926e613b7f52d2370cb7ba3d0b33cc10'
'e30ff5ecef199ce2a37b097709461c51ca07bdbbcc4609db74203834b62c60b1'
'51cda92f3ad2166eb2cb63ff80561f48b39688a57b66291d2eee5e1c7fcd8ee3'
- '7630105a0613d6758f0e298a8d197f307cb2d1657f7cedf10dc340c8f21c4511')
+ 'fc410ab9280fcc79072c7c8a3e562f13e72015e7c09df7dee50ef0655f31d4c9')
install=$pkgname.install
prepare() {
@@ -32,13 +32,14 @@ build() {
pip install -r requirements.txt
# Cleanup unsed
- rm -r docs test .dockerignore .gitignore .replit docker-compose.yml Dockerfile heroku.yml MANIFEST.in README.md requirements.txt setup.py
+ rm -r docs test .dockerignore .gitignore .replit docker-compose.yml Dockerfile heroku.yml MANIFEST.in README.md requirements.txt setup.py .github
}
package() {
install -m0644 -D "$srcdir/whoogle" "$pkgdir/etc/default/whoogle"
install -m0644 -D "$srcdir/whoogle.conf" "$pkgdir/usr/lib/sysusers.d/whoogle.conf"
install -m0644 -D "$srcdir/whoogle.service" "$pkgdir/usr/lib/systemd/system/whoogle.service"
+ install -Dm0644 "$srcdir/$pkgname-search/LICENSE" "$pkgdir/usr/share/licenses/$pkgname/LICENSE"
install -dm0755 "$pkgdir/opt/whoogle-search"
cp -r "$srcdir/$pkgname-search/" "$pkgdir/opt/"
}
diff --git a/whoogle.install b/whoogle.install
index 71cb90996d35..145d3f8dc5c7 100644
--- a/whoogle.install
+++ b/whoogle.install
@@ -1,15 +1,11 @@
post_install() {
- chown -R whoogle.whoogle /opt/whoogle-search/app/static/config
- systemctl enable --now whoogle
+ mkdir -p /opt/whoogle-search/app/static
+ chown -R whoogle.whoogle /opt/whoogle-search/app/static
echo ""
- echo "Enabled the Whoogle systemd service."
- echo "Visit localhost:5000 to start searching!"
+ echo "Enable the SystemD unit and visit localhost:5000 to start searching!"
echo ""
}
post_upgrade() {
- chown -R whoogle.whoogle /opt/whoogle-search/app/static/config
- systemctl daemon-reload
- systemctl restart whoogle
- echo "Restarted Whoogle systemd service."
+ chown -R whoogle.whoogle /opt/whoogle-search/app/static/
}
diff --git a/whoogle.service b/whoogle.service
index 2c0d3a300165..e5fb030f20d0 100644
--- a/whoogle.service
+++ b/whoogle.service
@@ -7,7 +7,8 @@ Wants=network-online.target
Type=simple
User=whoogle
WorkingDirectory=/opt/whoogle-search
-ExecStart=/opt/whoogle-search/venv/bin/python3 -um app --host 0.0.0.0 --port 5000
+EnvironmentFile=-/etc/default/whoogle
+ExecStart=/opt/whoogle-search/venv/bin/python -um app --host $BIND_ADDRESS --port $LISTEN_PORT
ExecReload=/bin/kill -HUP $MAINPID
Restart=always
RestartSec=3