Skip to content

Commit

Permalink
[fix] Fixed bug in auto-install #407
Browse files Browse the repository at this point in the history
  • Loading branch information
youhaveme9 authored and nemesifier committed Dec 18, 2024
1 parent 9ead0ca commit de300b5
Showing 1 changed file with 11 additions and 7 deletions.
18 changes: 11 additions & 7 deletions deploy/auto-install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -54,10 +54,18 @@ error_msg_with_continue() {

apt_dependenices_setup() {
start_step "Setting up dependencies..."
apt --yes install python3 python3-pip git python3-dev gawk libffi-dev libssl-dev gcc make &>>$LOG_FILE
apt --yes install python3 python3-pip git python3-dev gawk libffi-dev libssl-dev gcc make curl jq &>>$LOG_FILE
check_status $? "Python dependencies installation failed."
}

get_version_from_user() {
echo -ne ${GRN}"OpenWISP Version (leave blank for latest): "${NON}
read openwisp_version
if [[ -z "$openwisp_version" ]]; then
openwisp_version=$(curl -L --silent https://api.github.com/repos/openwisp/docker-openwisp/releases/latest | jq -r .tag_name)
fi
}

setup_docker() {
start_step "Setting up docker..."
docker info &>/dev/null
Expand Down Expand Up @@ -91,9 +99,7 @@ download_docker_openwisp() {

setup_docker_openwisp() {
echo -e ${GRN}"\nOpenWISP Configuration:"${NON}
echo -ne ${GRN}"OpenWISP Version (leave blank for latest): "${NON}
read openwisp_version
if [[ -z "$openwisp_version" ]]; then openwisp_version=latest; fi
get_version_from_user
echo -ne ${GRN}"Do you have .env file? Enter filepath (leave blank for ad-hoc configuration): "${NON}
read env_path
if [[ ! -f "$env_path" ]]; then
Expand Down Expand Up @@ -177,9 +183,7 @@ setup_docker_openwisp() {

upgrade_docker_openwisp() {
echo -e ${GRN}"\nOpenWISP Configuration:"${NON}
echo -ne ${GRN}"OpenWISP Version (leave blank for latest): "${NON}
read openwisp_version
if [[ -z "$openwisp_version" ]]; then openwisp_version=latest; fi
get_version_from_user
echo ""

download_docker_openwisp "$openwisp_version"
Expand Down

0 comments on commit de300b5

Please sign in to comment.