Skip to content

Commit

Permalink
Added installing extensions to Docker run
Browse files Browse the repository at this point in the history
This patch adds the installation of APRSD via pip during startup
time for the main server run.sh, admin.sh and listen.sh
  • Loading branch information
hemna committed Feb 25, 2024
1 parent 68f23d8 commit 4118541
Show file tree
Hide file tree
Showing 3 changed files with 34 additions and 0 deletions.
11 changes: 11 additions & 0 deletions docker/bin/admin.sh
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,17 @@ if [ ! -z "${APRSD_PLUGINS}" ]; then
pip3 install --user $plugin
done
fi
if [ ! -z "${APRSD_EXTENSIONS}" ]; then
OLDIFS=$IFS
IFS=','
echo "Installing APRSD extensions from pypi '$APRSD_EXTENSIONS'";
for extension in ${APRSD_EXTENSIONS}; do
IFS=$OLDIFS
# call your procedure/other scripts here below
echo "Installing '$extension'"
pip3 install --user $extension
done
fi

if [ -z "${LOG_LEVEL}" ] || [[ ! "${LOG_LEVEL}" =~ ^(CRITICAL|ERROR|WARNING|INFO)$ ]]; then
LOG_LEVEL="DEBUG"
Expand Down
11 changes: 11 additions & 0 deletions docker/bin/listen.sh
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,17 @@ if [ ! -z "${APRSD_PLUGINS}" ]; then
pip3 install --user $plugin
done
fi
if [ ! -z "${APRSD_EXTENSIONS}" ]; then
OLDIFS=$IFS
IFS=','
echo "Installing APRSD extensions from pypi '$APRSD_EXTENSIONS'";
for extension in ${APRSD_EXTENSIONS}; do
IFS=$OLDIFS
# call your procedure/other scripts here below
echo "Installing '$extension'"
pip3 install --user $extension
done
fi

if [ -z "${LOG_LEVEL}" ] || [[ ! "${LOG_LEVEL}" =~ ^(CRITICAL|ERROR|WARNING|INFO)$ ]]; then
LOG_LEVEL="DEBUG"
Expand Down
12 changes: 12 additions & 0 deletions docker/bin/run.sh
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,18 @@ if [ ! -z "${APRSD_PLUGINS}" ]; then
done
fi

if [ ! -z "${APRSD_EXTENSIONS}" ]; then
OLDIFS=$IFS
IFS=','
echo "Installing APRSD extensions from pypi '$APRSD_EXTENSIONS'";
for extension in ${APRSD_EXTENSIONS}; do
IFS=$OLDIFS
# call your procedure/other scripts here below
echo "Installing '$extension'"
pip3 install --user $extension
done
fi

if [ -z "${LOG_LEVEL}" ] || [[ ! "${LOG_LEVEL}" =~ ^(CRITICAL|ERROR|WARNING|INFO)$ ]]; then
LOG_LEVEL="DEBUG"
fi
Expand Down

0 comments on commit 4118541

Please sign in to comment.