Compare commits

...

6 Commits

Author SHA1 Message Date
CanbiZ
8984dbf601 Asterisk: add interactive version selection to installer
The install script now fetches available Asterisk versions (Standard, LTS, Certified) from the official website and prompts the user to select which version to install. The download and installation process adapts based on the user's choice. Also updated package management commands from 'apt-get' to 'apt' for consistency.
2025-10-29 16:27:28 +01:00
CanbiZ
5a01dd2ec9 Add protobuf dependencies to installation script 2025-10-29 15:52:17 +01:00
community-scripts-pr-app[bot]
7aaaa9a71f Update CHANGELOG.md (#8723)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2025-10-29 14:44:38 +00:00
Tobias
cbc2ba1832 tracktor: refactor envfile (#8711)
* tracktor: refactor enfile

* tracktor: fix: update links

* tracktor: add: mechanic to update envfile
2025-10-29 15:44:10 +01:00
CanbiZ
ee02bc1977 Add missing dependencies to libretranslate-install.sh
Added missing dependencies for LibreTranslate installation.
2025-10-29 15:37:42 +01:00
CanbiZ
fda22e8890 typo 2025-10-29 14:33:22 +01:00
6 changed files with 108 additions and 15 deletions

View File

@@ -21,6 +21,7 @@ Exercise vigilance regarding copycat or coat-tailing sites that seek to exploit
- #### 🔧 Refactor
- tracktor: refactor envfile [@CrazyWolf13](https://github.com/CrazyWolf13) ([#8711](https://github.com/community-scripts/ProxmoxVE/pull/8711))
- Kimai / Ghost / ManageMyDamnLife: Switch to MariaDB [@MickLesk](https://github.com/MickLesk) ([#8712](https://github.com/community-scripts/ProxmoxVE/pull/8712))
## 2025-10-28

View File

@@ -40,6 +40,29 @@ function update_script() {
sed -i 's|^EnvironmentFile=.*|EnvironmentFile=/opt/tracktor.env|' /etc/systemd/system/tracktor.service
systemctl daemon-reload
fi
if [ ! -d "/opt/tracktor-data/uploads" ]; then
mkdir -p /opt/tracktor-data/{uploads,logs}
EXISTING_AUTH_PIN=$(grep '^AUTH_PIN=' /opt/tracktor.env 2>/dev/null | cut -d'=' -f2)
AUTH_PIN=${EXISTING_AUTH_PIN:-123456}
cat <<EOF >/opt/tracktor.env
NODE_ENV=production
DB_PATH=/opt/tracktor-data/tracktor.db
UPLOADS_DIR="/opt/tracktor-data/uploads"
LOG_DIR="/opt/tracktor-data/logs"
# If server host is not set by default it will run on all interfaces - 0.0.0.0
# SERVER_HOST=""
SERVER_PORT=3000
# Set this if you want to secure your endpoints otherwise default will be "*"
CORS_ORIGINS="*"
# Set this if you are using backend and frontend separately.
# PUBLIC_API_BASE_URL=""
LOG_REQUESTS=true
LOG_LEVEL="info"
AUTH_PIN=${AUTH_PIN}
# PUBLIC_DEMO_MODE=false
# FORCE_DATA_SEED=false
EOF
fi
msg_ok "Corrected Services"
setup_nodejs

View File

@@ -9,9 +9,9 @@
"updateable": true,
"privileged": false,
"interface_port": 3000,
"documentation": "https://tracktor.bytedge.in/introduction.html",
"documentation": "https://github.com/javedh-dev/tracktor/tree/main/docs",
"config_path": "/opt/tracktor.env",
"website": "https://tracktor.bytedge.in/",
"website": "https://github.com/javedh-dev/tracktor",
"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.",
"install_methods": [

View File

@@ -13,8 +13,65 @@ setting_up_container
network_check
update_os
ASTERISK_VERSIONS_URL="https://www.asterisk.org/downloads/asterisk/all-asterisk-versions/"
html=$(curl -fsSL "$ASTERISK_VERSIONS_URL")
LTS_VERSION=""
for major in 20 22 24 26; do
block=$(echo "$html" | awk "/Asterisk $major - LTS/,/<ul>/")
ver=$(echo "$block" | grep -oE 'Download Latest - [0-9]+\.[0-9]+(\.[0-9]+)?' | head -n1 | sed -E 's/.* - //')
if [ -n "$ver" ]; then
LTS_VERSION="$LTS_VERSION $ver"
fi
unset ver block
done
LTS_VERSION=$(echo "$LTS_VERSION" | xargs | tr ' ' '\n' | sort -V | tail -n1)
STD_VERSION=""
for major in 21 23 25 27; do
block=$(echo "$html" | awk "/Asterisk $major</,/<ul>/")
ver=$(echo "$block" | grep -oE 'Download (Latest - )?[0-9]+\.[0-9]+(\.[0-9]+)?' | head -n1 | sed -E 's/.* - //;s/Download //')
if [ -n "$ver" ]; then
STD_VERSION="$STD_VERSION $ver"
fi
unset ver block
done
STD_VERSION=$(echo "$STD_VERSION" | xargs | tr ' ' '\n' | sort -V | tail -n1)
cert_block=$(echo "$html" | awk '/Certified Asterisk/,/<ul>/')
CERT_VERSION=$(echo "$cert_block" | grep -oE 'Download Latest - [0-9]+\.[0-9]+-cert[0-9]+' | head -n1 | sed -E 's/.* - //')
cat <<EOF
Choose Asterisk version to install:
1) Latest Standard ($STD_VERSION)
2) Latest LTS ($LTS_VERSION)
3) Latest Certified ($CERT_VERSION)
EOF
read -rp "Enter choice [1-3]: " ASTERISK_CHOICE
case "$ASTERISK_CHOICE" in
2)
ASTERISK_VERSION="$LTS_VERSION"
;;
3)
ASTERISK_VERSION="$CERT_VERSION"
CERTIFIED=1
;;
*)
ASTERISK_VERSION="$STD_VERSION"
;;
esac
if [[ "$CERTIFIED" == "1" ]]; then
RELEASE="certified-asterisk-${ASTERISK_VERSION}.tar.gz"
DOWNLOAD_URL="https://downloads.asterisk.org/pub/telephony/certified-asterisk/$RELEASE"
else
RELEASE="asterisk-${ASTERISK_VERSION}.tar.gz"
DOWNLOAD_URL="https://downloads.asterisk.org/pub/telephony/asterisk/$RELEASE"
fi
msg_info "Installing Dependencies"
$STD apt-get install -y \
$STD apt install -y \
libsrtp2-dev \
build-essential \
libedit-dev \
@@ -25,13 +82,12 @@ $STD apt-get install -y \
msg_ok "Installed Dependencies"
msg_info "Downloading Asterisk"
RELEASE=$(curl -fsSL https://downloads.asterisk.org/pub/telephony/asterisk/ | grep -o 'asterisk-[0-9]\+-current\.tar\.gz' | sort -V | tail -n1)
temp_file=$(mktemp)
curl -fsSL "https://downloads.asterisk.org/pub/telephony/asterisk/${RELEASE}" -o "$temp_file"
curl -fsSL "$DOWNLOAD_URL" -o "$temp_file"
mkdir -p /opt/asterisk
tar zxf "$temp_file" --strip-components=1 -C /opt/asterisk
cd /opt/asterisk
msg_ok "Downloaded Asterisk"
msg_ok "Downloaded Asterisk ($RELEASE)"
msg_info "Installing Asterisk"
$STD ./contrib/scripts/install_prereq install
@@ -51,6 +107,7 @@ customize
msg_info "Cleaning up"
rm -f "$temp_file"
$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"

View File

@@ -16,8 +16,12 @@ update_os
msg_info "Installing dependencies"
$STD apt install -y \
pkg-config \
build-essentials \
build-essential \
g++ \
cmake \
libprotobuf-dev \
protobuf-compiler \
libsentencepiece-dev \
libicu-dev
msg_ok "Installed dependencies"

View File

@@ -20,18 +20,26 @@ msg_info "Configuring Tracktor"
cd /opt/tracktor
$STD npm install
$STD npm run build
mkdir /opt/tracktor-data
mkdir -p /opt/tracktor-data/{uploads,logs}
HOST_IP=$(hostname -I | awk '{print $1}')
cat <<EOF >/opt/tracktor.env
NODE_ENV=production
PUBLIC_DEMO_MODE=false
DB_PATH=/opt/tracktor-data/tracktor.db
# Replace this URL if using behind reverse proxy for https traffic. Though it is optional and should work without changing
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
UPLOADS_DIR="/opt/tracktor-data/uploads"
LOG_DIR="/opt/tracktor-data/logs"
# If server host is not set by default it will run on all interfaces - 0.0.0.0
# SERVER_HOST=""
SERVER_PORT=3000
PORT=3000
# Set this if you want to secure your endpoints otherwise default will be "*"
# CORS_ORIGINS="*"
# Set this if you are using backend and frontend separately. For lxc installation this is not needed
# PUBLIC_API_BASE_URL=""
LOG_REQUESTS=true
LOG_LEVEL="info"
AUTH_PIN=123456
# PUBLIC_DEMO_MODE=false
# FORCE_DATA_SEED=false
EOF
msg_ok "Configured Tracktor"