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:
parent
e8f2f5532c
commit
053deaf42f
@ -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>
|
||||
|
13
www/nextcloud/files/occ.in
Normal file
13
www/nextcloud/files/occ.in
Normal 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}"
|
@ -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
|
||||
}
|
||||
]
|
||||
|
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user