Add central ports mount for all jails (#58)

* Add central ports mount for all jails, auto fetch, extract and auto update on install.

* Some verbosity cleanup
This commit is contained in:
Kjeld Schouten-Lebbing 2020-04-07 13:28:51 +02:00 committed by kjeld Schouten-Lebbing
parent 839abbe8ff
commit b24a7c153a
2 changed files with 8 additions and 7 deletions

View File

@ -88,6 +88,14 @@ else
createmount $1 ${global_dataset_config}
createmount $1 ${global_dataset_config}/$1 /config
# Create and Mount portsnap
echo "Mounting and fetching ports"
createmount $1 ${global_dataset_config}/portsnap
createmount $1 ${global_dataset_config}/portsnap/db /var/db/portsnap
createmount $1 ${global_dataset_config}/portsnap/ports /usr/ports
iocage exec "$1" "if [ -z /usr/ports ]; then portsnap fetch extract; else portsnap auto; fi"
echo "Jail creation completed for $1"
fi

View File

@ -134,11 +134,6 @@ fi
#
#####
# Create and Mount portsnap
createmount ${JAIL_NAME} ${global_dataset_config}/portsnap
createmount ${JAIL_NAME} ${global_dataset_config}/portsnap/db /var/db/portsnap
createmount ${JAIL_NAME} ${global_dataset_config}/portsnap/ports /usr/ports
# Create and Mount Nextcloud, Config and Files
createmount ${JAIL_NAME} ${global_dataset_config}/${JAIL_NAME}/config /usr/local/www/nextcloud/config
createmount ${JAIL_NAME} ${global_dataset_config}/${JAIL_NAME}/themes /usr/local/www/nextcloud/themes
@ -159,8 +154,6 @@ iocage exec "${JAIL_NAME}" chmod -R 770 /config/files
#
#####
iocage exec "${JAIL_NAME}" "if [ -z /usr/ports ]; then portsnap fetch extract; else portsnap auto; fi"
if [ "${DATABASE}" = "mariadb-external" ] || [ "${DATABASE}" = "mariadb-jail" ]; then
iocage exec "${JAIL_NAME}" pkg install -qy mariadb103-client php73-pdo_mysql php73-mysqli
elif [ "${DATABASE}" = "pgsql-external" ]; then