setup-nasbeery aktualisiert
cockpit
This commit is contained in:
+20
-32
@@ -69,20 +69,20 @@ whiptail --title "Possible data loss!" \
|
||||
FORMAT=$?
|
||||
|
||||
# pin cockpit to buster backports
|
||||
echo "Configure apt to install cockpit from backports repo"
|
||||
cat << EOF | tee -i /etc/apt/preferences.d/99-cockpit
|
||||
Package: cockpit cockpit-*
|
||||
Pin: release a=bullseye-backports
|
||||
Pin-Priority: 900
|
||||
EOF
|
||||
#echo "Configure apt to install cockpit from backports repo"
|
||||
#cat << EOF | tee -i /etc/apt/preferences.d/99-cockpit
|
||||
#Package: cockpit cockpit-*
|
||||
#Pin: release a=bullseye-backports
|
||||
#Pin-Priority: 900
|
||||
#EOF
|
||||
|
||||
grep contrib /etc/apt/sources.list
|
||||
if [ $? -gt 0 ]; then
|
||||
sed -i "s/main/main contrib non-free/g" /etc/apt/sources.list
|
||||
fi
|
||||
|
||||
echo "Add debian bullseye backports repo"
|
||||
echo "deb http://ftp.de.debian.org/debian/ bullseye-backports main contrib non-free" | tee -i /etc/apt/sources.list.d/bulleye-backports.list
|
||||
#echo "Add debian bullseye backports repo"
|
||||
#echo "deb http://ftp.de.debian.org/debian/ bullseye-backports main contrib non-free" | tee -i /etc/apt/sources.list.d/bulleye-backports.list
|
||||
|
||||
# update system and install packages
|
||||
echo "Updating package lists"
|
||||
@@ -111,12 +111,12 @@ echo "Intalling required packages"
|
||||
DEBIAN_FRONTEND=noninteractive DEBIAN_PRIORITY=critical apt -y -qq -o DPkg::options::="--force-confdef" -o DPkg::options::="--force-confold" install $headers ntpdate git apt-transport-https gnupg2 software-properties-common vim htop net-tools dnsutils dpkg-dev
|
||||
|
||||
# add extra apt keys
|
||||
echo "Add wsdd apt repo key"
|
||||
wget -O - https://pkg.ltec.ch/public/conf/ltec-ag.gpg.key | gpg --dearmor | tee -i /etc/apt/trusted.gpg.d/wsdd.gpg
|
||||
#echo "Add wsdd apt repo key"
|
||||
#wget -O - https://pkg.ltec.ch/public/conf/ltec-ag.gpg.key | gpg --dearmor | tee -i /etc/apt/trusted.gpg.d/wsdd.gpg
|
||||
|
||||
# add extra apt repos
|
||||
echo "Add wsdd apt repo url"
|
||||
echo "deb [signed-by=/etc/apt/trusted.gpg.d/wsdd.gpg] https://pkg.ltec.ch/public/ $(lsb_release -cs) main" | tee -i /etc/apt/sources.list.d/wsdd.list
|
||||
#echo "Add wsdd apt repo url"
|
||||
#echo "deb [signed-by=/etc/apt/trusted.gpg.d/wsdd.gpg] https://pkg.ltec.ch/public/ $(lsb_release -cs) main" | tee -i /etc/apt/sources.list.d/wsdd.list
|
||||
|
||||
echo "add 45drives repo key"
|
||||
wget -O - https://repo.45drives.com/key/gpg.asc | gpg --dearmor | tee -i /etc/apt/trusted.gpg.d/45drives.gpg
|
||||
@@ -127,26 +127,13 @@ echo "deb [signed-by=/etc/apt/trusted.gpg.d/45drives.gpg arch=amd64] https://rep
|
||||
echo "Updating package lists"
|
||||
apt -qq update
|
||||
echo "Installing samba"
|
||||
DEBIAN_FRONTEND=noninteractive DEBIAN_PRIORITY=critical apt -y -qq -o DPkg::options::="--force-confdef" -o DPkg::options::="--force-confold" install -t bullseye-backports acl samba-dsdb-modules samba-vfs-modules samba winbind wsdd zfs-dkms zfsutils-linux zfs-auto-snapshot
|
||||
|
||||
ARCH=$(arch)
|
||||
|
||||
if [[ "${ARCH}" == "aarch64" ]] || [[ "${ARCH}" == "riscv64" ]]; then
|
||||
znapzend_version=$(apt search znapzend 2>/dev/null | grep znapzend | cut -d ' ' -f2)
|
||||
wget -O znapzend_${znapzend_version}_amd64.deb https://repo.45drives.com/debian/pool/main/z/znapzend/znapzend_${znapzend_version}_amd64.deb
|
||||
mkdir znapzend
|
||||
dpkg-deb -R znapzend_${znapzend_version}_amd64.deb ./znapzend
|
||||
sed -i "s/amd64/${ARCH}/g" ./znapzend/DEBIAN/control
|
||||
sed -i "s/x86_64-linux-gnu/${ARCH}-linux-gnu/g" znapzend/usr/bin/*
|
||||
mv znapzend/usr/lib/x86_64-linux-gnu znapzend/usr/lib/${ARCH}-linux-gnu
|
||||
dpkg-deb -b znapzend znapzend_${znapzend_version}_${ARCH}.deb
|
||||
apt install ./znapzend_${znapzend_version}_${ARCH}.deb
|
||||
systemctl disable znapzend.service
|
||||
rm -r znapzend*
|
||||
fi
|
||||
DEBIAN_FRONTEND=noninteractive DEBIAN_PRIORITY=critical apt -y -qq -o DPkg::options::="--force-confdef" -o DPkg::options::="--force-confold" install acl samba-dsdb-modules samba-vfs-modules samba winbind wsdd zfs-dkms zfsutils-linux zfs-auto-snapshot
|
||||
|
||||
echo "Installing cockpit"
|
||||
DEBIAN_FRONTEND=noninteractive DEBIAN_PRIORITY=critical apt -y -qq -o DPkg::options::="--force-confdef" -o DPkg::options::="--force-confold" install --no-install-recommends cockpit cockpit-identities cockpit-file-sharing cockpit-navigator cockpit-zfs-manager cockpit-benchmark
|
||||
DEBIAN_FRONTEND=noninteractive DEBIAN_PRIORITY=critical apt -y -qq -o DPkg::options::="--force-confdef" -o DPkg::options::="--force-confold" install --no-install-recommends cockpit cockpit-identities cockpit-file-sharing cockpit-navigator cockpit-benchmark
|
||||
|
||||
git clone https://github.com/45drives/cockpit-zfs-manager.git
|
||||
cp -r cockpit-zfs-manager/zfs /usr/share/cockpit
|
||||
|
||||
echo "Activate zfs module"
|
||||
modprobe zfs
|
||||
@@ -210,6 +197,8 @@ smbpasswd -x $USERNAME
|
||||
(echo $PASSWORD; echo $PASSWORD) | smbpasswd -a $USERNAME
|
||||
usermod -aG sudo $USERNAME
|
||||
|
||||
mkdir -p /etc/cockpit/zfs/
|
||||
|
||||
echo "Writing cockpit configuration"
|
||||
cat << EOF | tee -i /etc/cockpit/zfs/config.json
|
||||
{
|
||||
@@ -257,7 +246,6 @@ EOF
|
||||
|
||||
if [ -f /etc/cockpit/zfs/shares.conf ]; then
|
||||
echo "Creating cockpit zfs shares conf"
|
||||
mkdir -p /etc/cockpit/zfs/
|
||||
cat << EOF | tee -i /etc/cockpit/zfs/shares.conf
|
||||
# COCKPIT ZFS MANAGER
|
||||
# WARNING: DO NOT EDIT, AUTO-GENERATED CONFIGURATION
|
||||
@@ -322,4 +310,4 @@ systemctl enable smbd nmbd wsdd
|
||||
echo "############################################"
|
||||
echo "nasbeery installation finished! rebooting..."
|
||||
echo "############################################"
|
||||
reboot
|
||||
reboot
|
||||
Reference in New Issue
Block a user