This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| { | |
| "OpenWRT Device Manager": { | |
| "id": "autopie.openwrt-device-manager", | |
| "type": "SHARE", | |
| "multiStage": true, | |
| "steps": [ | |
| { | |
| "id": "discover_clients", | |
| "path": "Download", | |
| "command": "set -eo pipefail\n\ncommand -v ssh >/dev/null 2>&1 || {\n echo \"OpenSSH is not installed.\"\n exit 1\n}\n\nif [[ ! \"$ROUTER_PORT\" =~ ^[0-9]+$ ]]; then\n echo \"Invalid SSH port.\"\n exit 1\nfi\n\nif [[ ! \"$FIREWALL_SRC_ZONE\" =~ ^[A-Za-z0-9_-]+$ ]] || [[ ! \"$FIREWALL_DEST_ZONE\" =~ ^[A-Za-z0-9_-]+$ ]]; then\n echo \"Invalid firewall zone name.\"\n exit 1\nfi\n\nif [[ \"$AUTH_METHOD\" == \"password\" ]] && ! command -v sshpass >/dev/null 2>&1; then\n echo \"sshpass is required for password authentication.\"\n exit 1\nfi\n\nexport SSH_KEY_RESOLVED=\"${SSH_KEY_PATH/#\\~/$HOME}\"\n\nif [[ \"$AUTH_METHOD\" == \"key\" && ! -r \"$SSH_KEY_RESOLVED\" ]]; then\n echo \"SSH private key is not readable: $SSH_KEY_RESOLVED\"\n exit 1\nfi\n\nSSH_BASE=(\n ssh\n -p \"$ROUTER_PORT\"\n -o |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/system/bin/env python | |
| import os | |
| import sys | |
| import tarfile | |
| import tempfile | |
| import shutil | |
| import subprocess | |
| import lzma | |
| def rewrite_tar_paths_xz(input_xz_path, output_xz_path, old_prefix, new_prefix): |