fixes
This commit is contained in:
parent
aad0ee8120
commit
801f27c54a
|
|
@ -23,7 +23,7 @@
|
|||
"ram": 1024,
|
||||
"hdd": 4,
|
||||
"os": "debian",
|
||||
"version": "13"
|
||||
"version": "12"
|
||||
}
|
||||
}
|
||||
],
|
||||
|
|
|
|||
|
|
@ -13,51 +13,28 @@ setting_up_container
|
|||
network_check
|
||||
update_os
|
||||
|
||||
msg_info "Detecting Distro"
|
||||
DISTRO_OS=$(awk -F= '/^ID=/{print $2}' /etc/os-release)
|
||||
DISTRO_VER=$(awk -F= '/^VERSION_ID=/{print $2}' /etc/os-release | tr -d '"')
|
||||
|
||||
case "$DISTRO_OS" in
|
||||
debian)
|
||||
if [[ "$DISTRO_VER" == "12" ]]; then
|
||||
DISTRO_VER="11"
|
||||
fi
|
||||
;;
|
||||
ubuntu)
|
||||
if [[ "$DISTRO_VER" == "22.04" ]]; then
|
||||
DISTRO_VER="20.04"
|
||||
NEEDS_LIBSSL1_1=true
|
||||
fi
|
||||
;;
|
||||
esac
|
||||
msg_ok "Detected $DISTRO_OS $DISTRO_VER"
|
||||
|
||||
msg_info "Installing Dependencies"
|
||||
if [[ "${NEEDS_LIBSSL1_1:-false}" == "true" ]]; then
|
||||
echo "deb http://security.ubuntu.com/ubuntu focal-security main" >/etc/apt/sources.list.d/focal-security.list
|
||||
$STD apt update
|
||||
$STD apt install -y libssl1.1
|
||||
rm -f /etc/apt/sources.list.d/focal-security.list
|
||||
fi
|
||||
temp_file=$(mktemp)
|
||||
curl -fsSL "http://archive.ubuntu.com/ubuntu/pool/main/o/openssl/libssl1.1_1.1.1f-1ubuntu2_amd64.deb" -o "$temp_file"
|
||||
$STD dpkg -i $temp_file
|
||||
msg_ok "Installed Dependencies"
|
||||
|
||||
msg_info "Setting up InvenTree Repository"
|
||||
mkdir -p /etc/apt/keyrings
|
||||
curl -fsSL https://dl.packager.io/srv/inventree/InvenTree/key | gpg --dearmor -o /etc/apt/keyrings/inventree.gpg
|
||||
echo "deb [signed-by=/etc/apt/keyrings/inventree.gpg] https://dl.packager.io/srv/deb/inventree/InvenTree/stable/${DISTRO_OS} ${DISTRO_VER} main" \
|
||||
>/etc/apt/sources.list.d/inventree.list
|
||||
$STD apt update
|
||||
echo "deb [signed-by=/etc/apt/keyrings/inventree.gpg] https://dl.packager.io/srv/deb/inventree/InvenTree/stable/ubuntu 20.04 main" >/etc/apt/sources.list.d/inventree.list
|
||||
msg_ok "Set up InvenTree Repository"
|
||||
|
||||
msg_info "Installing InvenTree"
|
||||
$STD apt install -y inventree || msg_error "Failed to install InvenTree"
|
||||
msg_ok "Installed InvenTree"
|
||||
msg_info "Setup ${APPLICATION} (Patience)"
|
||||
$STD apt-get update
|
||||
$STD apt-get install -y inventree
|
||||
msg_ok "Setup ${APPLICATION}"
|
||||
|
||||
motd_ssh
|
||||
customize
|
||||
|
||||
msg_info "Cleaning up"
|
||||
$STD apt -y autoremove
|
||||
$STD apt -y autoclean
|
||||
$STD apt -y clean
|
||||
rm -f $temp_file
|
||||
$STD apt-get -y autoremove
|
||||
$STD apt-get -y autoclean
|
||||
msg_ok "Cleaned"
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user