mirror of
https://github.com/naturalcrit/homebrewery.git
synced 2026-01-05 12:22:44 +00:00
Updated for last three LTS releases
This commit is contained in:
@@ -24,7 +24,9 @@ These instructions assume that you are installing to a completely new, fresh Ubu
|
|||||||
|
|
||||||
These installation instructions have been tested on the following Ubuntu releases:
|
These installation instructions have been tested on the following Ubuntu releases:
|
||||||
|
|
||||||
- *ubuntu-24.04.1-desktop-amd64*
|
- *ubuntu-24.04.1-desktop-amd64*
|
||||||
|
- *ubuntu-22.04.5-desktop-amd64*
|
||||||
|
- *ubuntu-20.04.6-desktop-amd64*
|
||||||
|
|
||||||
## Final Notes
|
## Final Notes
|
||||||
|
|
||||||
|
|||||||
@@ -1,5 +1,22 @@
|
|||||||
#!/bin/sh
|
#!/bin/sh
|
||||||
|
|
||||||
|
# Detect Ubuntu Version
|
||||||
|
export DISTRO=$(grep "^NAME=" /etc/os-release | awk -F '=' '{print $2}' | sed 's/"//g')
|
||||||
|
export DISTRO_VER=$(grep "VERSION_ID=" /etc/os-release | awk -F '=' '{print $2}' | sed 's/"//g')
|
||||||
|
export MATCHED="Yes"
|
||||||
|
|
||||||
|
if [ "${DISTRO}" != "Ubuntu" ];
|
||||||
|
then
|
||||||
|
echo :: Ubuntu not detected. Are you using an alternate spin or derivative?
|
||||||
|
echo :: Detected - ${DISTRO}
|
||||||
|
read -p [y/N] YESNO
|
||||||
|
if [ "${YESNO}" != "Y" ] && [ ]"${YESNO}" != "y" ]; then
|
||||||
|
exit
|
||||||
|
fi
|
||||||
|
|
||||||
|
MATCHED="No"
|
||||||
|
fi
|
||||||
|
|
||||||
# Install CURL and add required NodeJS source to package repo
|
# Install CURL and add required NodeJS source to package repo
|
||||||
echo ::Install CURL
|
echo ::Install CURL
|
||||||
apt install -y curl
|
apt install -y curl
|
||||||
@@ -7,13 +24,30 @@ echo ::Add NodeJS source to package repo
|
|||||||
curl -fsSL https://deb.nodesource.com/setup_20.x | sudo -E bash -
|
curl -fsSL https://deb.nodesource.com/setup_20.x | sudo -E bash -
|
||||||
|
|
||||||
# Add Mongo CE Source
|
# Add Mongo CE Source
|
||||||
echo ::Add Mongo CE source to package repo
|
if [ ${DISTRO} = "Ubuntu" ];
|
||||||
curl -fsSL https://www.mongodb.org/static/pgp/server-8.0.asc | \
|
then
|
||||||
sudo gpg -o /usr/share/keyrings/mongodb-server-8.0.gpg \
|
echo ::Add Mongo CE source to package repo
|
||||||
--dearmor
|
curl -fsSL https://www.mongodb.org/static/pgp/server-8.0.asc | \
|
||||||
echo "deb [ arch=amd64,arm64 signed-by=/usr/share/keyrings/mongodb-server-8.0.gpg ] https://repo.mongodb.org/apt/ubuntu noble/mongodb-org/8.0 multiverse" | sudo tee /etc/apt/sources.list.d/mongodb-org-8.0.list
|
sudo gpg -o /usr/share/keyrings/mongodb-server-8.0.gpg \
|
||||||
sudo apt-get update
|
--dearmor
|
||||||
|
if [ "${DISTRO_VER}" == "24.04" ]; then
|
||||||
|
echo "deb [ arch=amd64,arm64 signed-by=/usr/share/keyrings/mongodb-server-8.0.gpg ] https://repo.mongodb.org/apt/ubuntu noble/mongodb-org/8.0 multiverse" | sudo tee /etc/apt/sources.list.d/mongodb-org-8.0.list
|
||||||
|
elif [ "${DISTRO_VER}" == "22.04" ]; then
|
||||||
|
echo "deb [ arch=amd64,arm64 signed-by=/usr/share/keyrings/mongodb-server-8.0.gpg ] https://repo.mongodb.org/apt/ubuntu jammy/mongodb-org/8.0 multiverse" | sudo tee /etc/apt/sources.list.d/mongodb-org-8.0.list
|
||||||
|
elif [ "${DISTRO_VER}" == "20.04" ]; then
|
||||||
|
echo "deb [ arch=amd64,arm64 signed-by=/usr/share/keyrings/mongodb-server-8.0.gpg ] https://repo.mongodb.org/apt/ubuntu focal/mongodb-org/8.0 multiverse" | sudo tee /etc/apt/sources.list.d/mongodb-org-8.0.list
|
||||||
|
else
|
||||||
|
MATCHED="No"
|
||||||
|
fi
|
||||||
|
sudo apt-get update
|
||||||
|
fi
|
||||||
|
|
||||||
|
if [ ${MATCHED} == "No" ]; then
|
||||||
|
echo :: WARNING
|
||||||
|
echo :: Unable to determine Ubuntu version for Mongo installation purposes.
|
||||||
|
echo :: Please check your spin/distro documentation to install Mongo CE and enable it on startup.
|
||||||
|
fi
|
||||||
|
|
||||||
# Install required packages
|
# Install required packages
|
||||||
echo ::Install Homebrewery requirements
|
echo ::Install Homebrewery requirements
|
||||||
apt satisfy -y git nodejs npm mongodb-org
|
apt satisfy -y git nodejs npm mongodb-org
|
||||||
@@ -35,7 +69,9 @@ npm audit fix
|
|||||||
npm run postinstall
|
npm run postinstall
|
||||||
|
|
||||||
# Create Homebrewery service
|
# Create Homebrewery service
|
||||||
echo ::Create systemctl daemon-reload
|
echo ::Create Homebrewery service
|
||||||
|
ln -s /usr/local/homebrewery/install/ubuntu/etc/systemd/system/homebrewery.service /etc/systemd/system/homebrewery.service
|
||||||
|
systemctl daemon-reload
|
||||||
echo ::Set Homebrewery to start automatically
|
echo ::Set Homebrewery to start automatically
|
||||||
systemctl enable homebrewery
|
systemctl enable homebrewery
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user