From e62e3d3557cb54c0f1b0df363ee317a37f89ff78 Mon Sep 17 00:00:00 2001 From: Thorsten Spille Date: Sun, 21 Nov 2021 15:46:54 +0100 Subject: [PATCH] Create install-cockpit-zfs-manager --- install-cockpit-zfs-manager | 60 +++++++++++++++++++++++++++++++++++++ 1 file changed, 60 insertions(+) create mode 100644 install-cockpit-zfs-manager diff --git a/install-cockpit-zfs-manager b/install-cockpit-zfs-manager new file mode 100644 index 0000000..a39fff5 --- /dev/null +++ b/install-cockpit-zfs-manager @@ -0,0 +1,60 @@ +#!/bin/bash +source /etc/os-release +echo "deb http://deb.debian.org/debian $VERSION_CODENAME-backports main" > /etc/apt/sources.list.d/$VERSION_CODENAME-backports.list +apt update +cat << EOF > /etc/apt/preferences.d/90_cockpit +Package: cockpit cockpit-* +Pin: release n=$VERSION_CODENAME-backports +Pin-Priority: 990 +EOF +apt install --yes --no-install-recommends cockpit +git clone https://github.com/optimans/cockpit-zfs-manager.git && cp -r cockpit-zfs-manager/zfs /usr/share/cockpit +mkdir -p /etc/cockpit/zfs +mkdir -p /etc/cockpit/zfs/shares +mkdir -p /etc/cockpit/zfs/snapshots +cat << EOF > /etc/cockpit/zfs/config.json +{ + "#1": "COCKPIT ZFS MANAGER", + "#2": "WARNING: DO NOT EDIT, AUTO-GENERATED CONFIGURATION", + "cockpit": { + "manage": true + }, + "disks": { + "base2": false + }, + "loglevel": "2", + "samba": { + "manage": false, + "windowscompatibility": true + }, + "updates": { + "check": true + }, + "zfs": { + "filesystem": { + "cloneorigin": false, + "quotarestrict": true, + "readonlylockdown": false, + "snapshotactions": true + }, + "snapshot": { + "filesystemlist": true + }, + "status": { + "errorcolors": true, + "trimunsupported": false + }, + "storagepool": { + "activetab": 1, + "boot": true, + "bootlockdown": true, + "count": true, + "refreshall": false, + "root": true + } + } +} +cat << EOF > /etc/cockpit/zfs/shares.conf +# COCKPIT ZFS MANAGER +# WARNING: DO NOT EDIT, AUTO-GENERATED CONFIGURATION +EOF