Merge pull request #1413 from mempool/wiz/create-zfs-filesystem-for-backups

Create zfs filesystem for /backup and chown to mempool
This commit is contained in:
wiz 2022-03-19 16:08:29 +00:00 committed by GitHub
commit 91d55e02d6
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -440,6 +440,8 @@ osCertbotDryRun()
zfsCreateFilesystems()
{
zfs create -o "mountpoint=/backup" "${ZPOOL}/backup"
zfs create -o "mountpoint=${ELEMENTS_HOME}" "${ZPOOL}/elements"
zfs create -o "mountpoint=${BITCOIN_HOME}" "${ZPOOL}/bitcoin"
zfs create -o "mountpoint=${ELECTRS_HOME}" "${ZPOOL}/electrs"
@ -816,6 +818,7 @@ id "${MEMPOOL_USER}"
echo "[*] Creating Mempool data folder"
osSudo "${ROOT_USER}" mkdir -p "${MEMPOOL_HOME}"
osSudo "${ROOT_USER}" chown -R "${MEMPOOL_USER}:${MEMPOOL_GROUP}" "${MEMPOOL_HOME}"
osSudo "${ROOT_USER}" chown -R "${MEMPOOL_USER}:${MEMPOOL_GROUP}" /backup
osSudo "${MEMPOOL_USER}" touch "${MEMPOOL_HOME}/.zshrc"
echo "[*] Cloning Mempool repo from ${MEMPOOL_REPO_URL}"