aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorFrancesco Colista <fcolista@alpinelinux.org>2016-04-25 07:42:14 +0000
committerFrancesco Colista <fcolista@alpinelinux.org>2016-04-25 07:42:19 +0000
commit30b01c8f5a91e076fcae13e72e95066eb2fee4ba (patch)
tree297b51490430112823ec53c9e33ffed6a2b01522
parent870ecaf7a71176d759f0aede06572bd59a6f1627 (diff)
community/icingaweb2: implemented post-install script, changed pkggroup
-rw-r--r--community/icingaweb2/APKBUILD17
-rw-r--r--community/icingaweb2/icingaweb2.post-install6
2 files changed, 15 insertions, 8 deletions
diff --git a/community/icingaweb2/APKBUILD b/community/icingaweb2/APKBUILD
index b5209494eb4..4a8ce504207 100644
--- a/community/icingaweb2/APKBUILD
+++ b/community/icingaweb2/APKBUILD
@@ -2,7 +2,7 @@
# Maintainer: Francesco Colista <fcolista@alpinelinux.org>
pkgname=icingaweb2
pkgver=2.3.1
-pkgrel=1
+pkgrel=2
pkgdesc="Web Interface for Icinga2"
url="http://www.icinga.org"
arch="noarch"
@@ -12,8 +12,8 @@ depends="icinga2 php php-gd php-ldap php-intl php-pgsql php-mysql
php-imagick php-pdo_mysql php-pdo_pgsql"
depends_dev=""
makedepends="$depends_dev"
-pkggroups="www-data"
-install=""
+pkggroups="icingaweb2"
+install="$pkgname.post-install"
subpackages="$pkgname-doc $pkgname-bash-completion:bashcomp"
source="$pkgname-$pkgver.tar.gz::https://github.com/Icinga/${pkgname}/archive/v${pkgver}.tar.gz"
@@ -44,20 +44,21 @@ package() {
ln -s /usr/share/webapps/icingaweb2/bin/icingacli "$pkgdir"/usr/bin/icingacli
chmod 2770 "$pkgdir"/etc/$pkgname
chmod 750 "$pkgdir"/var/log/$pkgname
- chgrp -R $pkggroups "$pkgdir"/etc/$pkgname
install -Dm644 COPYING "$pkgdir/usr/share/licenses/icingaweb2/LICENSE"
cat >"$pkgdir"/usr/share/doc/$pkgname/README.alpine <<EOF
-You need to change the owner of log dir according with the user of your webserver:
+You need to add to $pkgroups group the owner of the user of your webserver
For nginx, as example:
- # chown -R nginx /var/log/icingaweb2
+ # adduser nginx $pkgusers
+or
+ #adduser nobody $pkgusers
For Apache:
- # chown -R apache /var/log/icingaweb2
+ # adduser apache $pkgusers
For lighttpd:
- # chown -R lighttpd /var/log/icingaweb2
+ # adduser lighttpd $pkgusers
Also, you may remove the user of your webserver from group 'icingacmd' if no other icinga web interface is installed.
EOF
diff --git a/community/icingaweb2/icingaweb2.post-install b/community/icingaweb2/icingaweb2.post-install
new file mode 100644
index 00000000000..425b0c05d2d
--- /dev/null
+++ b/community/icingaweb2/icingaweb2.post-install
@@ -0,0 +1,6 @@
+#!/bin/sh
+
+/usr/share/webapps/icingaweb2/bin/icingacli setup config directory --group icingaweb2;
+echo "Please take note of this setup token. This should be pasted into icingaweb2 setup web page: "
+/usr/share/webapps/icingaweb2/bin/icingacli setup token create;
+exit 0