2
0
mirror of https://github.com/inventree/InvenTree.git synced 2025-06-17 04:25:42 +00:00
Files
.devcontainer
.devops
.github
.vscode
assets
contrib
container
deploy
dev_reqs
installer
packager.io
before.sh
functions.sh
nginx.prod.conf
postinstall.sh
preinstall.sh
install.sh
docs
src
.git-blame-ignore-revs
.gitattributes
.gitignore
.pkgr.yml
.pre-commit-config.yaml
CONTRIBUTING.md
LICENSE
Procfile
README.md
RELEASE.md
SECURITY.md
codecov.yml
crowdin.yml
pyproject.toml
readthedocs.yml
requirements.txt
runtime.txt
tasks.py
InvenTree/contrib/packager.io/preinstall.sh
Matthias Mair 0f1645e389 Various small packaging fixes ()
* move repo setting for packager to yml

* fix python detection

* fix persistent setting writing (during onboarding)

* clean up OS before uninstalling
2024-07-19 08:49:51 +10:00

16 lines
888 B
Bash
Executable File

#!/bin/bash
#
# packager.io preinstall/preremove script
#
PATH=${APP_HOME}/env/bin:${APP_HOME}/:/sbin:/bin:/usr/sbin:/usr/bin:
# Envs that should be passed to setup commands
export SETUP_ENVS=PATH,APP_HOME,INVENTREE_MEDIA_ROOT,INVENTREE_STATIC_ROOT,INVENTREE_BACKUP_DIR,INVENTREE_PLUGINS_ENABLED,INVENTREE_PLUGIN_FILE,INVENTREE_CONFIG_FILE,INVENTREE_SECRET_KEY_FILE,INVENTREE_DB_ENGINE,INVENTREE_DB_NAME,INVENTREE_DB_USER,INVENTREE_DB_PASSWORD,INVENTREE_DB_HOST,INVENTREE_DB_PORT,INVENTREE_ADMIN_USER,INVENTREE_ADMIN_EMAIL,INVENTREE_ADMIN_PASSWORD,SETUP_NGINX_FILE,SETUP_ADMIN_PASSWORD_FILE,SETUP_NO_CALLS,SETUP_DEBUG,SETUP_EXTRA_PIP,SETUP_PYTHON
if test -f "${APP_HOME}/env/bin/pip"; then
echo "# Clearing precompiled files"
sudo -u ${APP_USER} --preserve-env=$SETUP_ENVS bash -c "cd ${APP_HOME} && invoke clear-generated"
else
echo "# No python environment found - skipping"
fi