12 lines
634 B
Bash
Executable File
12 lines
634 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 luci |
|
|
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"
|