From 7cd3e40f9ca4114228dc91207b7fc66f12708a0e Mon Sep 17 00:00:00 2001 From: Tobias <96661824+CrazyWolf13@users.noreply.github.com> Date: Tue, 23 Sep 2025 10:46:03 +0200 Subject: [PATCH] tracktor: bump to debian 13 | feature bump (#7818) --- ct/tracktor.sh | 21 +++++++++++---------- frontend/public/json/tracktor.json | 8 ++++---- install/tracktor-install.sh | 10 ++++++---- 3 files changed, 21 insertions(+), 18 deletions(-) diff --git a/ct/tracktor.sh b/ct/tracktor.sh index a7fb9181c..3f43ae454 100644 --- a/ct/tracktor.sh +++ b/ct/tracktor.sh @@ -11,7 +11,7 @@ var_cpu="${var_cpu:-2}" var_ram="${var_ram:-4096}" var_disk="${var_disk:-6}" var_os="${var_os:-debian}" -var_version="${var_version:-12}" +var_version="${var_version:-13}" var_unprivileged="${var_unprivileged:-1}" header_info "$APP" @@ -33,22 +33,23 @@ function update_script() { systemctl stop tracktor msg_ok "Stopped Service" - msg_info "Creating Backup" - cp /opt/tracktor/app/backend/.env /opt/tracktor.env - msg_ok "Created Backup" + msg_info "Correcting Services" + if [ -f /opt/tracktor/app/backend/.env ]; then + mv /opt/tracktor/app/backend/.env /opt/tracktor.env + echo 'AUTH_PIN=123456' >> /opt/tracktor.env + sed -i 's|^EnvironmentFile=.*|EnvironmentFile=/opt/tracktor.env|' /etc/systemd/system/tracktor.service + systemctl daemon-reload + fi + msg_ok "Corrected Services" setup_nodejs CLEAN_INSTALL=1 fetch_and_deploy_gh_release "tracktor" "javedh-dev/tracktor" "tarball" "latest" "/opt/tracktor" - msg_info "Updating ${APP}" + msg_info "Updating tracktor" cd /opt/tracktor $STD npm install $STD npm run build - msg_ok "Updated $APP" - - msg_info "Restoring Backup" - cp /opt/tracktor.env /opt/tracktor/app/backend/.env - msg_ok "Restored Backup" + msg_ok "Updated tracktor" msg_info "Starting Service" systemctl start tracktor diff --git a/frontend/public/json/tracktor.json b/frontend/public/json/tracktor.json index 00d358576..ca08d6dbf 100644 --- a/frontend/public/json/tracktor.json +++ b/frontend/public/json/tracktor.json @@ -10,7 +10,7 @@ "privileged": false, "interface_port": 3000, "documentation": "https://tracktor.bytedge.in/introduction.html", - "config_path": "/opt/tracktor/app/server/.env", + "config_path": "/opt/tracktor.env", "website": "https://tracktor.bytedge.in/", "logo": "https://cdn.jsdelivr.net/gh/selfhst/icons/webp/tracktor.webp", "description": "Tracktor is an open-source web application for comprehensive vehicle management.\nEasily track fuel consumption, maintenance, insurance, and regulatory documents for all your vehicles in one place.", @@ -23,17 +23,17 @@ "ram": 1024, "hdd": 6, "os": "Debian", - "version": "12" + "version": "13" } } ], "default_credentials": { "username": null, - "password": null + "password": "123456" }, "notes": [ { - "text": "Please check and update the '/opt/tracktor/app/backend/.env' file if using behind reverse proxy.", + "text": "Please check and update the '/opt/tracktor.env' file if using behind reverse proxy.", "type": "info" } ] diff --git a/install/tracktor-install.sh b/install/tracktor-install.sh index d0d432d9c..8db049bac 100644 --- a/install/tracktor-install.sh +++ b/install/tracktor-install.sh @@ -22,7 +22,7 @@ $STD npm install $STD npm run build mkdir /opt/tracktor-data HOST_IP=$(hostname -I | awk '{print $1}') -cat </opt/tracktor/app/backend/.env +cat </opt/tracktor.env NODE_ENV=production PUBLIC_DEMO_MODE=false DB_PATH=/opt/tracktor-data/tracktor.db @@ -31,6 +31,7 @@ PUBLIC_API_BASE_URL=http://$HOST_IP:3000 # Here add the reverse proxy url as well to avoid cross errors from the app. CORS_ORIGINS=http://$HOST_IP:3000 PORT=3000 +AUTH_PIN=123456 EOF msg_ok "Configured Tracktor" @@ -43,7 +44,7 @@ After=network.target [Service] Type=simple WorkingDirectory=/opt/tracktor -EnvironmentFile=/opt/tracktor/app/backend/.env +EnvironmentFile=/opt/tracktor.env ExecStart=/usr/bin/npm start [Install] @@ -56,6 +57,7 @@ motd_ssh customize msg_info "Cleaning up" -$STD apt-get -y autoremove -$STD apt-get -y autoclean +$STD apt -y autoremove +$STD apt -y autoclean +$STD apt -y clean msg_ok "Cleaned"