Update cockpit-install.sh (#8346)
This commit is contained in:
parent
f303b5e3ef
commit
53f397512a
@ -27,73 +27,12 @@ function update_script() {
|
|||||||
msg_error "No ${APP} Installation Found!"
|
msg_error "No ${APP} Installation Found!"
|
||||||
exit
|
exit
|
||||||
fi
|
fi
|
||||||
UPD=$(whiptail --backtitle "Proxmox VE Helper Scripts" --title "SUPPORT" --radiolist --cancel-button Exit-Script "Spacebar = Select" 11 58 4 \
|
|
||||||
"1" "Update LXC" ON \
|
msg_info "Updating ${APP} LXC"
|
||||||
"2" "Install cockpit-file-sharing" OFF \
|
$STD apt update
|
||||||
"3" "Install cockpit-identities" OFF \
|
$STD apt -y upgrade
|
||||||
"4" "Install cockpit-navigator" OFF \
|
msg_ok "Updated ${APP} LXC"
|
||||||
3>&1 1>&2 2>&3)
|
exit
|
||||||
|
|
||||||
if [ "$UPD" == "1" ]; then
|
|
||||||
msg_info "Updating ${APP} LXC"
|
|
||||||
$STD apt update
|
|
||||||
$STD apt -y upgrade
|
|
||||||
msg_ok "Updated ${APP} LXC"
|
|
||||||
exit
|
|
||||||
fi
|
|
||||||
|
|
||||||
if [ "$UPD" == "2" ]; then
|
|
||||||
msg_info "Installing dependencies (patience)"
|
|
||||||
$STD apt install -y \
|
|
||||||
attr \
|
|
||||||
nfs-kernel-server \
|
|
||||||
samba \
|
|
||||||
samba-common-bin \
|
|
||||||
winbind \
|
|
||||||
gawk
|
|
||||||
msg_ok "Installed dependencies"
|
|
||||||
msg_info "Installing Cockpit file sharing"
|
|
||||||
URL=$(curl -fsSL https://api.github.com/repos/45Drives/cockpit-file-sharing/releases/latest | grep download | grep focal_all.deb | cut -d\" -f4)
|
|
||||||
FILE=$(basename "$URL")
|
|
||||||
curl -fsSL "$URL" -o "$FILE"
|
|
||||||
$STD dpkg -i "$FILE" || $STD apt install -f -y
|
|
||||||
rm -f "$FILE"
|
|
||||||
msg_ok "Installed Cockpit file sharing"
|
|
||||||
exit
|
|
||||||
fi
|
|
||||||
|
|
||||||
if [ "$UPD" == "3" ]; then
|
|
||||||
msg_info "Installing dependencies (patience)"
|
|
||||||
$STD apt install -y \
|
|
||||||
psmisc \
|
|
||||||
samba \
|
|
||||||
samba-common-bin
|
|
||||||
msg_ok "Installed dependencies"
|
|
||||||
msg_info "Installing Cockpit identities"
|
|
||||||
URL=$(curl -fsSL https://api.github.com/repos/45Drives/cockpit-identities/releases/latest | grep download | grep focal_all.deb | cut -d\" -f4)
|
|
||||||
FILE=$(basename "$URL")
|
|
||||||
curl -fsSL "$URL" -o "$FILE"
|
|
||||||
$STD dpkg -i "$FILE" || $STD apt install -f -y
|
|
||||||
rm -f "$FILE"
|
|
||||||
msg_ok "Installed Cockpit identities"
|
|
||||||
exit
|
|
||||||
fi
|
|
||||||
|
|
||||||
if [ "$UPD" == "4" ]; then
|
|
||||||
msg_info "Installing dependencies"
|
|
||||||
$STD apt install -y \
|
|
||||||
rsync \
|
|
||||||
zip
|
|
||||||
msg_ok "Installed dependencies"
|
|
||||||
msg_info "Installing Cockpit navigator"
|
|
||||||
URL=$(curl -fsSL https://api.github.com/repos/45Drives/cockpit-navigator/releases/latest | grep download | grep focal_all.deb | cut -d\" -f4)
|
|
||||||
FILE=$(basename "$URL")
|
|
||||||
curl -fsSL "$URL" -o "$FILE"
|
|
||||||
$STD dpkg -i "$FILE" || $STD apt install -f -y
|
|
||||||
rm -f "$FILE"
|
|
||||||
msg_ok "Installed Cockpit navigator"
|
|
||||||
exit
|
|
||||||
fi
|
|
||||||
}
|
}
|
||||||
|
|
||||||
start
|
start
|
||||||
|
|||||||
@ -16,12 +16,48 @@ update_os
|
|||||||
|
|
||||||
msg_info "Installing Cockpit"
|
msg_info "Installing Cockpit"
|
||||||
source /etc/os-release
|
source /etc/os-release
|
||||||
echo "deb http://deb.debian.org/debian ${VERSION_CODENAME}-backports main" >/etc/apt/sources.list.d/backports.list
|
|
||||||
|
cat <<EOF >/etc/apt/sources.list.d/debian-backports.sources
|
||||||
|
Types: deb deb-src
|
||||||
|
URIs: http://deb.debian.org/debian
|
||||||
|
Suites: ${VERSION_CODENAME}-backports
|
||||||
|
Components: main
|
||||||
|
Enabled: yes
|
||||||
|
Signed-By: /usr/share/keyrings/debian-archive-keyring.gpg
|
||||||
|
EOF
|
||||||
|
|
||||||
$STD apt update
|
$STD apt update
|
||||||
$STD apt install -t ${VERSION_CODENAME}-backports cockpit --no-install-recommends -y
|
$STD apt install -t ${VERSION_CODENAME}-backports cockpit cracklib-runtime --no-install-recommends -y
|
||||||
sed -i "s/root//g" /etc/cockpit/disallowed-users
|
sed -i "s/root//g" /etc/cockpit/disallowed-users
|
||||||
msg_ok "Installed Cockpit"
|
msg_ok "Installed Cockpit"
|
||||||
|
|
||||||
|
read -r -p "Would you like to install 45Drives' cockpit-file-sharing, cockpit-identities, and cockpit-navigator <y/N> " prompt
|
||||||
|
if [[ "${prompt,,}" =~ ^(y|yes)$ ]]; then
|
||||||
|
install_45drives=true
|
||||||
|
if [[ "${VERSION_ID}" -ge 13 ]]; then
|
||||||
|
read -r -p "Debian ${VERSION_ID} is not officially supported by 45Drives yet, would you like to continue anyway? <y/N> " prompt
|
||||||
|
if [[ ! "${prompt,,}" =~ ^(y|yes)$ ]]; then
|
||||||
|
install_45drives=false
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
if [[ "$install_45drives" == "true" ]]; then
|
||||||
|
msg_info "Installing 45Drives' cockpit extensions"
|
||||||
|
curl -fsSL https://repo.45drives.com/key/gpg.asc | gpg --pinentry-mode loopback --batch --yes --dearmor -o /usr/share/keyrings/45drives-archive-keyring.gpg
|
||||||
|
cat <<EOF >/etc/apt/sources.list.d/45drives-enterprise.sources
|
||||||
|
Types: deb
|
||||||
|
URIs: https://repo.45drives.com/enterprise/debian
|
||||||
|
Suites: bookworm
|
||||||
|
Components: main
|
||||||
|
Architectures: amd64
|
||||||
|
Signed-By: /usr/share/keyrings/45drives-archive-keyring.gpg
|
||||||
|
EOF
|
||||||
|
|
||||||
|
$STD apt update
|
||||||
|
$STD apt install cockpit-file-sharing cockpit-identities cockpit-navigator -y
|
||||||
|
msg_ok "Installed 45Drives' cockpit extensions"
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
|
||||||
motd_ssh
|
motd_ssh
|
||||||
customize
|
customize
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user