summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorMartiMcFly2016-12-06 15:51:46 +0100
committerMartiMcFly2016-12-06 15:51:46 +0100
commit0b74b863e8d3cf7bdaf2d80a2f5f24eacbdf4e4d (patch)
tree8c3f210061c5ba12858a1bba5da1dc3b4f792195
parent526ee7defa55be1de8117d5e06f6a3406d042b62 (diff)
downloadaur-0b74b863e8d3cf7bdaf2d80a2f5f24eacbdf4e4d.tar.gz
copy settings on first install
-rw-r--r--PKGBUILD15
-rw-r--r--install10
2 files changed, 15 insertions, 10 deletions
diff --git a/PKGBUILD b/PKGBUILD
index 23d80963814d..d7c59eb5241b 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -6,7 +6,7 @@ pkgname='zarafa-postfixadmin'
replaces=('zarafa-postfixadmin-worker')
groups=('zarafa'
'kopano')
-pkgver=0.22
+pkgver=0.24
pkgrel=89
pkgdesc="A web based interface used to manage mailboxes, virtual domains and aliases created for Zarafa-Server with DB-Plugin and Postfix"
arch=('any')
@@ -36,14 +36,12 @@ package_zarafa-postfixadmin() {
###
_destdir_webapp=${pkgdir}/usr/share/webapps/${pkgname}
_destdir_etc=${pkgdir}/etc/webapps/${pkgname}
- _destdir_fetchmail=${pkgdir}/etc/fetchmail-all
_destdir_fetchmailpostfixadmin=${pkgdir}/etc/mail/postfixadmin
_destdir_doc=${pkgdir}/usr/share/doc/${pkgname}
_destdir_var=${pkgdir}/var/lib/${pkgname}
_destdir_usr=${pkgdir}/usr/share/${pkgname}
_destdir_systemd=${pkgdir}/usr/lib/systemd/system
- install -dm755 ${_destdir_fetchmail}
install -dm755 ${_destdir_fetchmailpostfixadmin}
install -dm755 ${_destdir_webapp}
install -dm755 ${_destdir_etc}
@@ -65,18 +63,17 @@ package_zarafa-postfixadmin() {
rm -rf ${_destdir_webapp}/debian
# etc
- cp ${_destdir_webapp}/config.inc.php ${_destdir_etc}/config.example.php
+ cp ${_destdir_webapp}/config.inc.php ${_destdir_etc}/config.php.example
# ZARAFA-POSTFIXADMIN
###
cd ${srcdir}/zarafa-postfixadmin-${pkgver}
- cp etc/config.local.php ${_destdir_webapp}
+ cp webapp/config.local.php ${_destdir_webapp}
# etc
cp etc/nginx-location.conf ${_destdir_etc}
- cp etc/config.default.php ${_destdir_etc}/config.local.php
- cp etc/config ${_destdir_fetchmail}
- cp etc/fetchmail.conf ${_destdir_fetchmailpostfixadmin}
+ cp etc/config.local.php ${_destdir_etc}/config.local.php.example
+ cp etc/fetchmail.conf ${_destdir_fetchmailpostfixadmin}/fetchmail.conf.example
# docs
cp -r doc/* ${_destdir_doc}
@@ -99,5 +96,5 @@ package_zarafa-postfixadmin() {
cp systemd/* ${_destdir_systemd}
# usr
- mv usr/* ${_destdir_usr}
+ cp usr/* ${_destdir_usr}
}
diff --git a/install b/install
index a8059c6c6da2..c268fa9e81b8 100644
--- a/install
+++ b/install
@@ -14,10 +14,18 @@ function installdir() {
}
post_install() {
+ systemd-sysusers
systemd-tmpfiles --create
# template cache needs to be writeable
installdir http:http 0700 0600 /var/lib/zarafa-postfixadmin
- installdir http:http 0700 0600 /etc/webapps/zarafa-postfixadmin
+ # etc
+ _etc=/etc/webapps/zarafa-postfixadmin
+ installdir http:http 0700 0600 ${_etc}
+ install --backup=simple --suffix .pacsave -o http -g http -m 0600 ${_etc}/config.local.php.example ${_etc}/config.local.php
+
+ # fetchmail
+ installdir fetchmail:fetchmail 0700 0600 /etc/mail/postfixadmin
+ install --backup=simple --suffix .pacsave -o fetchmail -g fetchmail -m 0600 /etc/mail/postfixadmin/fetchmail.conf.example /etc/mail/postfixadmin/fetchmail.conf
} \ No newline at end of file