mihomo-kit/tools/push.sh
Sam Latsin 2557a9aa49 mihomo-kit: config kit for mihomo on nikki and FlClash
Templates + router script + browser constructor that build mihomo
profiles (router home/street, mobile) with optional OpenVPN (TOTP)
and Tailscale, one-command installer and maintenance commands.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-08 00:57:28 +03:00

12 lines
629 B
Bash
Executable File

#!/bin/sh
# Copy the kit to the router's /etc/nikki/kit, then run the installer there:
# tools/push.sh root@192.168.32.1
# ssh root@192.168.32.1 sh /etc/nikki/kit/install.sh
set -eu
host=${1:?usage: tools/push.sh root@<router>}
cd "$(dirname "$0")/.."
# ustar without macOS metadata: busybox tar on OpenWrt chokes on pax/xattr headers
COPYFILE_DISABLE=1 tar --no-xattrs --format ustar -czf - install.sh templates presets router |
ssh "$host" 'mkdir -p /etc/nikki/kit && tar xzf - -C /etc/nikki/kit && chmod +x /etc/nikki/kit/router/*.sh'
echo "pushed to $host:/etc/nikki/kit — now: ssh $host sh /etc/nikki/kit/install.sh"