mirror of
https://github.com/community-scripts/ProxmoxVED.git
synced 2026-02-26 05:55:54 +00:00
cr suggetions
This commit is contained in:
@@ -14,36 +14,35 @@ network_check
|
||||
update_os
|
||||
|
||||
msg_info "Installing Dependencies (matching Livebook Dockerfile)"
|
||||
$STD apt-get install --no-install-recommends -y \
|
||||
$STD apt-get install -y \
|
||||
build-essential \
|
||||
ca-certificates \
|
||||
cmake \
|
||||
curl \
|
||||
git \
|
||||
libncurses5-dev
|
||||
msg_ok "Installed Dependencies"
|
||||
|
||||
|
||||
msg_info "Installing Erlang and Elixir"
|
||||
msg_info "Installing Erlang and Elixir
|
||||
ELIXIR_VERSION=1.18.4-otp-27
|
||||
ERLANG_VERSION=27.3.4
|
||||
mkdir -p /opt /data
|
||||
export HOME=/opt
|
||||
touch $HOME/.env
|
||||
cd /opt || exit 1
|
||||
curl -fsSO https://elixir-lang.org/install.sh
|
||||
sh install.sh elixir@1.18.4 otp@27.3.4 >/dev/null 2>&1
|
||||
$STD sh install.sh elixir@$ELXIR_VERSION otp@$ERLANG_VERSION
|
||||
echo 'export HOME=/opt' >> $HOME/.env
|
||||
echo 'export PATH="/opt/.elixir-install/installs/otp/27.3.4/bin:/opt/.elixir-install/installs/elixir/1.18.4-otp-27/bin:$PATH"' >> $HOME/.env
|
||||
msg_ok "Installed Erlang 27.3.4 and Elixir 1.18.4"
|
||||
echo 'export PATH="/opt/.elixir-install/installs/otp/${ERLANG_VERSION}/bin:/opt/.elixir-install/installs/elixir/${ELIXIR_VERSION}/bin:$PATH"' >> $HOME/.env
|
||||
msg_ok "Installed Erlang and Elixir"
|
||||
|
||||
msg_info "Installing Livebook"
|
||||
RELEASE=$(curl -fsSL https://api.github.com/repos/livebook-dev/livebook/releases/latest | grep "tag_name" | awk -F'"' '{print $4}')
|
||||
echo "${RELEASE}" >/opt/Livebook_version.txt
|
||||
|
||||
source /opt/.env
|
||||
cd /opt || exit 1
|
||||
mix local.hex --force >/dev/null 2>&1
|
||||
mix local.rebar --force >/dev/null 2>&1
|
||||
mix escript.install hex livebook --force >/dev/null 2>&1
|
||||
$STD mix local.hex --force
|
||||
$STD mix local.rebar --force
|
||||
$STD mix escript.install hex livebook --force
|
||||
echo 'export PATH="$HOME/.mix/escripts:$PATH"' >> ~/.env
|
||||
msg_ok "Installed Livebook"
|
||||
|
||||
@@ -75,17 +74,14 @@ StandardError=journal
|
||||
WantedBy=multi-user.target
|
||||
EOF
|
||||
|
||||
$STD systemctl enable livebook.service
|
||||
$STD systemctl start livebook.service
|
||||
systemctl enable -q --now livebook
|
||||
msg_ok "Created Livebook Service"
|
||||
|
||||
motd_ssh
|
||||
customize
|
||||
|
||||
msg_info "Cleaning Up"
|
||||
rm -f /opt/install.sh
|
||||
$STD apt-get autoremove -y
|
||||
$STD apt-get autoclean
|
||||
msg_ok "Cleaned Up"
|
||||
|
||||
motd_ssh
|
||||
customize
|
||||
|
||||
echo -e "\n${CREATING}${GN}Livebook Installation Complete!${CL}\n"
|
||||
|
||||
Reference in New Issue
Block a user