Skip to content

Instantly share code, notes, and snippets.

@hiifeng
hiifeng / dynv6_ipv6-up.sh
Last active February 27, 2024 00:07
Because we don't want to use crontab to execute the script, we hope to execute the update script through the /etc/ppp/ipv6-up script of the system after establishing the pppoe session. But I found that after my router established pppoe session, the IPv6 address acquisition would be delayed, resulting in the update failure when $address was empty…
#!/bin/sh -e
# based on https://gist.github.com/corny/7a07f5ac901844bd20c9
# modify by ifeng; May 13, 2021
#hostname=$1
#device=$2
# Enter the relevant parameters in line 10-12. “device” enter the interface name, such as pppoe0, switch0, it is recommended to enter pppoe0.
token=your token