mirror of
https://github.com/bashclub/proxmox-zfs-postinstall.git
synced 2024-12-25 01:30:12 +01:00
62 lines
1.5 KiB
Bash
62 lines
1.5 KiB
Bash
#!/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
|
|
}
|
|
}
|
|
}
|
|
EOF
|
|
cat << EOF > /etc/cockpit/zfs/shares.conf
|
|
# COCKPIT ZFS MANAGER
|
|
# WARNING: DO NOT EDIT, AUTO-GENERATED CONFIGURATION
|
|
EOF
|