Fixed browser installation

This commit is contained in:
2025-06-22 23:27:30 +02:00
parent 1117aa664d
commit e9d0c6d4c2
3 changed files with 3 additions and 9 deletions

View File

@ -461,7 +461,7 @@ if (!$state || !isset($state['localData']) || !json_decode($state['localData'],
<script>
window.THOS = {
version: '6 Build-35'
version: '6 Build-36'
};
let timeoutSeconds = 180;

View File

@ -1,13 +1,10 @@
#!/bin/bash
set -e
# Location inside your repo where the .xpi is stored
XPI_SOURCE="./thos-unblocker@surillya.com.xpi"
XPI_SOURCE="/usr/thos/thos-unblocker@surillya.com.xpi"
# Firefox global extension directory
FF_EXT_DIR="/usr/lib/firefox/browser/extensions"
# Firefox autoconfig files (for signature disable)
AUTOCONFIG_PREF_DIR="/usr/lib/firefox/defaults/pref"
AUTOCONFIG_FILE="$AUTOCONFIG_PREF_DIR/autoconfig.js"
AUTOCONFIG_SCRIPT="/usr/lib/firefox/thos.cfg"
@ -19,15 +16,12 @@ if [[ ! -f "$XPI_SOURCE" ]]; then
exit 1
fi
# Create extensions dir if missing
sudo mkdir -p "$FF_EXT_DIR"
# Copy .xpi file system-wide
sudo cp "$XPI_SOURCE" "$FF_EXT_DIR/thos-unblocker@surillya.com.xpi"
echo "Copied extension to $FF_EXT_DIR"
# Optional: disable signature requirement (dev mode)
echo "Configuring Firefox to allow unsigned extensions..."
sudo mkdir -p "$AUTOCONFIG_PREF_DIR"

View File

@ -20,7 +20,7 @@ if (!file_exists($extensionMarker)) {
</body>
</html>';
if ($_SERVER['REQUEST_METHOD'] === 'POST' && $_POST['install'] === 'yes') {
shell_exec('bash /usr/thos/install-unblocker.sh');
shell_exec(' sudo bash /usr/thos/install-unblocker.sh');
file_put_contents($extensionMarker, 'installed');
echo '<script>alert("Extension installed. System will reboot.");</script>';
sleep(1);