-
-
Save liruqi/cf7e0ebe311246b2e30ce1a9ccede60c to your computer and use it in GitHub Desktop.
x-wrt
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
# https://github.com/x-wrt/x-wrt.github.io/tree/master/docs/install-on-vps | |
# Aliyun install script | |
if [ ! -f /root/x-wrt.img.gz ]; then | |
wget -O /root/x-wrt.img.gz --no-check-certificate https://downloads.x-wrt.com/rom/x-wrt-8.0-b202005101652-x86-64-generic-ext4-combined.img.gz | |
sed -i "s/errors\=remount-ro/ro/g" /etc/fstab | |
reboot | |
fi | |
vda1=`df -h|awk '{ if ($6 == "/") print $1 }'` | |
# TODO: check if /dev/shm/ exists... | |
(zcat /root/x-wrt.img.gz; echo open=443,network=dhcp) >/dev/shm/x-wrt.img | |
cat /dev/shm/x-wrt.img > $vda1 && reboot |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment