Files
weval-l99/fix_l99_refresh.py
2026-04-20 04:43:32 +02:00

23 lines
559 B
Python

#!/usr/bin/env python3
path = "/var/www/html/api/handlers/l99-honest-refresh.sh"
with open(path, "rb") as f:
raw = f.read()
# Master timeout 90 -> 200
old = b"MO=$(timeout 90 php -r"
new = b"MO=$(timeout 200 php -r"
if old in raw:
raw = raw.replace(old, new, 1)
print("Master timeout 90 -> 200")
# Opus timeout 90 -> 300
old = b"OO=$(timeout 90 php -r"
new = b"OO=$(timeout 300 php -r"
if old in raw:
raw = raw.replace(old, new, 1)
print("Opus timeout 90 -> 300")
with open(path, "wb") as f:
f.write(raw)
print(f"size: {len(raw)}")