mirror of
https://github.com/community-scripts/ProxmoxVE.git
synced 2026-06-01 21:29:36 +02:00
Compare commits
2 Commits
MickLesk-p
...
fix/odoo-l
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
6c1288cb16 | ||
|
|
03a94aff8e |
@@ -476,8 +476,6 @@ Exercise vigilance regarding copycat or coat-tailing sites that seek to exploit
|
||||
|
||||
- #### 🐞 Bug Fixes
|
||||
|
||||
- Glance: preserve glance.yml across updates [@michelroegl-brunner](https://github.com/michelroegl-brunner) ([#14845](https://github.com/community-scripts/ProxmoxVE/pull/14845))
|
||||
- NginxProxymanager: set Certbot version in npm.service environment variable (2.15.0) [@MickLesk](https://github.com/MickLesk) ([#14843](https://github.com/community-scripts/ProxmoxVE/pull/14843))
|
||||
- [FileFlows] Fix service handling by using systemctl --all with quoted glob [@adrianmusante](https://github.com/adrianmusante) ([#14838](https://github.com/community-scripts/ProxmoxVE/pull/14838))
|
||||
|
||||
## 2026-05-31
|
||||
|
||||
@@ -53,6 +53,12 @@ function update_script() {
|
||||
export VIDEO_DIRECTORY=/opt/fireshare-videos
|
||||
export PROCESSED_DIRECTORY=/opt/fireshare-processed
|
||||
$STD uv run flask db upgrade
|
||||
|
||||
msg_info "Building Fireshare Client"
|
||||
cd /opt/fireshare/app/client
|
||||
$STD npm install
|
||||
$STD npm run build
|
||||
msg_ok "Built Fireshare Client"
|
||||
msg_ok "Updated Fireshare"
|
||||
|
||||
msg_info "Starting Service"
|
||||
|
||||
12
ct/glance.sh
12
ct/glance.sh
@@ -34,20 +34,8 @@ function update_script() {
|
||||
systemctl stop glance
|
||||
msg_ok "Stopped Service"
|
||||
|
||||
if [[ -f /opt/glance/glance.yml ]]; then
|
||||
msg_info "Backing up glance.yml"
|
||||
cp /opt/glance/glance.yml /tmp/glance.yml.bak
|
||||
msg_ok "Backed up glance.yml"
|
||||
fi
|
||||
|
||||
CLEAN_INSTALL=1 fetch_and_deploy_gh_release "glance" "glanceapp/glance" "prebuild" "latest" "/opt/glance" "glance-linux-amd64.tar.gz"
|
||||
|
||||
if [[ -f /tmp/glance.yml.bak ]]; then
|
||||
msg_info "Restoring glance.yml"
|
||||
mv /tmp/glance.yml.bak /opt/glance/glance.yml
|
||||
msg_ok "Restored glance.yml"
|
||||
fi
|
||||
|
||||
msg_info "Starting Service"
|
||||
systemctl start glance
|
||||
msg_ok "Started Service"
|
||||
|
||||
@@ -39,7 +39,7 @@ function update_script() {
|
||||
cp /opt/kan/.env /opt/kan.env.bak
|
||||
msg_ok "Backed up Data"
|
||||
|
||||
CLEAN_INSTALL=1 fetch_and_deploy_gh_tag "kan" "kanbn/kan" "latest" "tarball"
|
||||
CLEAN_INSTALL=1 fetch_and_deploy_gh_tag "kan" "kanbn/kan" "tarball"
|
||||
|
||||
msg_info "Restoring Configuration"
|
||||
cp /opt/kan.env.bak /opt/kan/.env
|
||||
|
||||
@@ -216,12 +216,6 @@ EOF
|
||||
msg_ok "Initialized Backend"
|
||||
|
||||
msg_info "Starting Services"
|
||||
CERTBOT_VER=$(/opt/certbot/bin/certbot --version 2>&1 | awk '{print $NF}')
|
||||
if grep -q "Environment=CERTBOT_VERSION" /lib/systemd/system/npm.service; then
|
||||
sed -i "s|Environment=CERTBOT_VERSION=.*|Environment=CERTBOT_VERSION=${CERTBOT_VER}|" /lib/systemd/system/npm.service
|
||||
else
|
||||
sed -i "/Environment=NODE_ENV=production/a Environment=CERTBOT_VERSION=${CERTBOT_VER}" /lib/systemd/system/npm.service
|
||||
fi
|
||||
sed -i 's/user npm/user root/g; s/^pid/#pid/g' /usr/local/openresty/nginx/conf/nginx.conf
|
||||
sed -r -i 's/^([[:space:]]*)su npm npm/\1#su npm npm/g;' /etc/logrotate.d/nginx-proxy-manager
|
||||
systemctl daemon-reload
|
||||
|
||||
24
ct/odoo.sh
24
ct/odoo.sh
@@ -20,6 +20,22 @@ variables
|
||||
color
|
||||
catch_errors
|
||||
|
||||
ensure_lxml_html_clean() {
|
||||
ensure_dependencies python3-lxml
|
||||
if apt-cache show python3-lxml-html-clean &>/dev/null; then
|
||||
ensure_dependencies python3-lxml-html-clean
|
||||
else
|
||||
curl -fsSL "http://archive.ubuntu.com/ubuntu/pool/universe/l/lxml-html-clean/python3-lxml-html-clean_0.1.1-1_all.deb" -o /opt/python3-lxml-html-clean.deb
|
||||
$STD dpkg -i /opt/python3-lxml-html-clean.deb
|
||||
$STD apt-get install -f -y
|
||||
rm -f /opt/python3-lxml-html-clean.deb
|
||||
fi
|
||||
if ! python3 -c "import lxml_html_clean; from lxml.html import clean" 2>/dev/null; then
|
||||
msg_error "lxml.html.clean is not available (python3-lxml-html-clean required)"
|
||||
exit 1
|
||||
fi
|
||||
}
|
||||
|
||||
function update_script() {
|
||||
header_info
|
||||
check_container_storage
|
||||
@@ -29,12 +45,7 @@ function update_script() {
|
||||
msg_error "No ${APP} Installation Found!"
|
||||
exit
|
||||
fi
|
||||
ensure_dependencies python3-lxml
|
||||
if ! [[ $(dpkg -s python3-lxml-html-clean 2>/dev/null) ]]; then
|
||||
curl -fsSL "http://archive.ubuntu.com/ubuntu/pool/universe/l/lxml-html-clean/python3-lxml-html-clean_0.1.1-1_all.deb" -o /opt/python3-lxml-html-clean.deb
|
||||
$STD dpkg -i /opt/python3-lxml-html-clean.deb
|
||||
rm -f /opt/python3-lxml-html-clean.deb
|
||||
fi
|
||||
ensure_lxml_html_clean
|
||||
|
||||
RELEASE=$(curl -fsSL https://nightly.odoo.com/ | grep -oE 'href="[0-9]+\.[0-9]+/nightly"' | head -n1 | cut -d'"' -f2 | cut -d/ -f1)
|
||||
LATEST_VERSION=$(curl -fsSL "https://nightly.odoo.com/${RELEASE}/nightly/deb/" |
|
||||
@@ -51,6 +62,7 @@ function update_script() {
|
||||
msg_info "Updating ${APP} to ${LATEST_VERSION}"
|
||||
curl -fsSL https://nightly.odoo.com/${RELEASE}/nightly/deb/odoo_${RELEASE}.latest_all.deb -o /opt/odoo.deb
|
||||
$STD apt install -y /opt/odoo.deb
|
||||
ensure_lxml_html_clean
|
||||
rm -f /opt/odoo.deb
|
||||
echo "$LATEST_VERSION" >/opt/${APP}_version.txt
|
||||
msg_ok "Updated ${APP} to ${LATEST_VERSION}"
|
||||
|
||||
@@ -160,8 +160,7 @@ $STD yarn install --network-timeout 600000
|
||||
msg_ok "Initialized Backend"
|
||||
|
||||
msg_info "Creating Service"
|
||||
CERTBOT_VER=$(/opt/certbot/bin/certbot --version 2>&1 | awk '{print $NF}')
|
||||
cat <<EOF >/lib/systemd/system/npm.service
|
||||
cat <<'EOF' >/lib/systemd/system/npm.service
|
||||
[Unit]
|
||||
Description=Nginx Proxy Manager
|
||||
After=network.target
|
||||
@@ -170,7 +169,6 @@ Wants=openresty.service
|
||||
[Service]
|
||||
Type=simple
|
||||
Environment=NODE_ENV=production
|
||||
Environment=CERTBOT_VERSION=${CERTBOT_VER}
|
||||
ExecStartPre=-mkdir -p /tmp/nginx/body /data/letsencrypt-acme-challenge
|
||||
ExecStart=/usr/bin/node index.js --abort_on_uncaught_exception --max_old_space_size=250
|
||||
WorkingDirectory=/app
|
||||
|
||||
@@ -13,10 +13,25 @@ setting_up_container
|
||||
network_check
|
||||
update_os
|
||||
|
||||
ensure_lxml_html_clean() {
|
||||
ensure_dependencies python3-lxml
|
||||
if apt-cache show python3-lxml-html-clean &>/dev/null; then
|
||||
ensure_dependencies python3-lxml-html-clean
|
||||
else
|
||||
curl -fsSL "http://archive.ubuntu.com/ubuntu/pool/universe/l/lxml-html-clean/python3-lxml-html-clean_0.1.1-1_all.deb" -o /opt/python3-lxml-html-clean.deb
|
||||
$STD dpkg -i /opt/python3-lxml-html-clean.deb
|
||||
$STD apt-get install -f -y
|
||||
rm -f /opt/python3-lxml-html-clean.deb
|
||||
fi
|
||||
if ! python3 -c "import lxml_html_clean; from lxml.html import clean" 2>/dev/null; then
|
||||
msg_error "lxml.html.clean is not available (python3-lxml-html-clean required)"
|
||||
exit 1
|
||||
fi
|
||||
}
|
||||
|
||||
msg_info "Installing Dependencies"
|
||||
$STD apt install -y python3-lxml wkhtmltopdf
|
||||
curl -fsSL "http://archive.ubuntu.com/ubuntu/pool/universe/l/lxml-html-clean/python3-lxml-html-clean_0.1.1-1_all.deb" -o /opt/python3-lxml-html-clean.deb
|
||||
$STD dpkg -i /opt/python3-lxml-html-clean.deb
|
||||
$STD apt install -y wkhtmltopdf
|
||||
ensure_lxml_html_clean
|
||||
msg_ok "Installed Dependencies"
|
||||
|
||||
PG_VERSION="18" setup_postgresql
|
||||
@@ -31,6 +46,7 @@ LATEST_VERSION=$(curl -fsSL "https://nightly.odoo.com/${RELEASE}/nightly/deb/" |
|
||||
msg_info "Setup Odoo $RELEASE"
|
||||
curl -fsSL https://nightly.odoo.com/${RELEASE}/nightly/deb/odoo_${RELEASE}.latest_all.deb -o /opt/odoo.deb
|
||||
$STD apt install -y /opt/odoo.deb
|
||||
ensure_lxml_html_clean
|
||||
msg_ok "Setup Odoo $RELEASE"
|
||||
|
||||
msg_info "Setup PostgreSQL Database"
|
||||
@@ -59,7 +75,6 @@ sed -i \
|
||||
/etc/odoo/odoo.conf
|
||||
$STD sudo -u odoo odoo -c /etc/odoo/odoo.conf -d odoo -i base --stop-after-init
|
||||
rm -f /opt/odoo.deb
|
||||
rm -f /opt/python3-lxml-html-clean.deb
|
||||
echo "${LATEST_VERSION}" >/opt/${APPLICATION}_version.txt
|
||||
msg_ok "Configured Odoo"
|
||||
|
||||
|
||||
Reference in New Issue
Block a user