1
0
mirror of https://git.FreeBSD.org/ports.git synced 2025-01-20 08:27:15 +00:00

www/nextcloud: Add occ wrapper

This commit is contained in:
Bernard Spil 2021-09-12 12:58:09 +00:00
parent e8f2f5532c
commit 053deaf42f
4 changed files with 19 additions and 4 deletions

View File

@ -1,5 +1,6 @@
PORTNAME= nextcloud
PORTVERSION= 22.1.1
PORTREVISION= 1
CATEGORIES= www
MASTER_SITES= https://download.nextcloud.com/server/releases/
PKGNAMESUFFIX= ${PHP_PKGNAMESUFFIX}
@ -21,7 +22,7 @@ NEXTCLOUD_GROUPNAME?= ${WWWGRP}
WRKSRC= ${WRKDIR}/${PORTNAME}
NO_BUILD= yes
NO_ARCH= yes
SUB_FILES= config.sample.php pkg-message plist.post
SUB_FILES= config.sample.php occ pkg-message plist.post
SUB_LIST= NEXTCLOUD_USERNAME=${NEXTCLOUD_USERNAME} \
NEXTCLOUD_GROUPNAME=${NEXTCLOUD_GROUPNAME}
PLIST_SUB= ${SUB_LIST}
@ -81,5 +82,6 @@ do-install:
-e '/^\.\/config\/config\.sample\.php/d' \
-e 's,^\.,${WWWDIR_REL},' >> ${TMPPLIST}
${CAT} ${WRKDIR}/plist.post >> ${TMPPLIST}
${INSTALL_SCRIPT} ${WRKDIR}/occ ${STAGEDIR}${LOCALBASE}/bin/occ
.include <bsd.port.mk>

View File

@ -0,0 +1,13 @@
#/bin/sh
args=
for arg in "$@" ; do
if [ "${arg#* }" != "${arg}" ] ; then
args="${args} '${arg}'"
else
args="${args} ${arg}"
fi
done
cd %%WWWDIR%%
su -m %%NEXTCLOUD_USERNAME%% -c "%%LOCALBASE%%/bin/php %%WWWDIR%%/occ ${args}"

View File

@ -36,14 +36,13 @@ EOM
After a version migration you should upgrade your nextcloud instance
using command line:
cd %%WWWDIR%%
su -m www -c "php ./occ upgrade"
occ upgrade
Merge any changes to %%WWWDIR%%/.htaccess.dist into .htaccess (above the
'#### DO NOT CHANGE ANYTHING ABOVE THIS LINE ####' divider if it exists)
and update the dynamic part of the file using the commandline:
su -m www -c "php ./occ maintenance:update:htaccess"
occ maintenance:update:htaccess
EOM
}
]

View File

@ -1,3 +1,4 @@
bin/occ
@sample(,%%NEXTCLOUD_GROUPNAME%%,644) %%WWWDIR%%/.htaccess.dist %%WWWDIR%%/.htaccess
@(%%NEXTCLOUD_USERNAME%%,%%NEXTCLOUD_GROUPNAME%%,664) %%WWWDIR%%/.user.ini
@sample %%WWWDIR%%/config/config.sample.php %%WWWDIR%%/config/config.php