This file contains 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
$remoteport = bash.exe -c "ifconfig eth0 | grep 'inet '" | |
$found = $remoteport -match '\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3}'; | |
if( $found ){ | |
$remoteport = $matches[0]; | |
} else{ | |
echo "The Script Exited, the ip address of WSL 2 cannot be found"; | |
exit; | |
} |
This file contains 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
#/usr/syno/sbin/syno-letsencrypt renew-all -vv | |
##OR https://letsdebug.net/ fill domain field and send form, click on "Show verbose information" (?debug=y) | |
##go to #LetsEncryptStaging-Debug section | |
#now copy param based on this format "The key authorization file from the server did not match this challenge "URI.ACCOUNT_TOKEN" != "SOMETHING WRONG" | |
#edit /usr/syno/share/nginx/LetsEncrypt.mustache | |
location ~ ^/.well-known/acme-challenge/(.*)$ { | |
default_type text/plain; | |
return 200 $1.ACCOUNT_TOKEN; | |
} | |
#save it and synosystemctl restart nginx |
This file contains 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
# make it executable `chmod +x ddns-update` | |
# move it path `mv ddns-update /usr/bin/` | |
# setup cronjob for every 15 minutes `crontab -e` | |
# */15 * * * * ddns-update >/dev/null 2>&1 | |
# dont forget to change your own domain & password | |
# uncomment if you want internet connection check before running | |
#while ! ping -c 1 -W 1 8.8.8.8; do | |
# echo "DDNS-UPDATE: Waiting internet connection.." | |
# sleep 2 |