Last active
November 27, 2023 14:58
-
-
Save hypeitnow/de71375279a215055006f3a484aed947 to your computer and use it in GitHub Desktop.
genie_install
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#! /usr/bin/env bash | |
set -e | |
# change these if you want | |
UBUNTU_VERSION="23.04" | |
GENIE_VERSION="2.5" | |
GENIE_FILE="systemd-genie_${GENIE_VERSION}_amd64" | |
GENIE_FILE_PATH="/tmp/${GENIE_FILE}.deb" | |
GENIE_DIR_PATH="/tmp/${GENIE_FILE}" | |
function installDebPackage() { | |
# install repackaged systemd-genie | |
sudo dpkg -i "${GENIE_FILE_PATH}" | |
rm -rf "${GENIE_FILE_PATH}" | |
} | |
function downloadDebPackage() { | |
rm -f "${GENIE_FILE_PATH}" | |
pushd /tmp | |
wget --content-disposition \ | |
"https://github.com/arkane-systems/genie/releases/download/v${GENIE_VERSION}/systemd-genie_${GENIE_VERSION}_amd64.deb" | |
popd | |
} | |
function installDependencies() { | |
sudo apt-get update | |
wget --content-disposition \ | |
"https://packages.microsoft.com/config/ubuntu/${UBUNTU_VERSION}/packages-microsoft-prod.deb" | |
sudo dpkg -i packages-microsoft-prod.deb | |
rm packages-microsoft-prod.deb | |
sudo apt-get install apt-transport-https | |
sudo apt-get update | |
sudo apt-get install -y \ | |
dotnet-runtime-8.0 \ | |
python3-pip python3-psutil \ | |
systemd-container daemonize | |
sudo rm -f /usr/sbin/daemonize | |
sudo ln -s /usr/bin/daemonize /usr/sbin/daemonize | |
# git clone http://github.com/bmc/daemonize.git | |
# cd daemonize ; sh configure ; make ; sudo make install | |
# cd - | |
} | |
function main() { | |
installDependencies | |
downloadDebPackage | |
installDebPackage | |
} | |
main |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment