56 行
3.3 KiB
Bash
実行ファイル
56 行
3.3 KiB
Bash
実行ファイル
#!/bin/sh
|
|
|
|
DARKNETSRV=""
|
|
CLEARNETSRV=""
|
|
|
|
# Asset
|
|
rsync -rtvzP ass $DARKNETSRV:/www/active/ryocafe.site
|
|
|
|
# Website
|
|
## 準備
|
|
rm -rf tor i2p
|
|
cp -r www tor
|
|
cp -r www i2p
|
|
|
|
## Tor
|
|
cd tor
|
|
find . -type f -name "*.html" -exec sed -i 's/http:\/\/ryocafe\.site/http:\/\/asc7ewkcvat2wsoi5yuwkej5ukyrqqnpnzpj4u34r2jxnoxhnbx6yqad\.onion/g' {} +
|
|
find . -type f -name "*.html" -exec sed -i 's/http:\/\/ass\.ryocafe\.site/http:\/\/ass\.asc7ewkcvat2wsoi5yuwkej5ukyrqqnpnzpj4u34r2jxnoxhnbx6yqad\.onion/g' {} +
|
|
find . -type f -name "*.html" -exec sed -i 's/http:\/\/pol\.ryocafe\.site/http:\/\/pol\.asc7ewkcvat2wsoi5yuwkej5ukyrqqnpnzpj4u34r2jxnoxhnbx6yqad\.onion/g' {} +
|
|
find . -type f -name "*.html" -exec sed -i 's/https:\/\/076\.moe/http:\/\/7dt6irsmfvbrtgn4nuah56kky6mvr472fbwwaltuxpf26qdqkdhfvnqd\.onion/g' {} +
|
|
|
|
find . -type f -name "blog.atom" -exec sed -i 's/http:\/\/ryocafe\.site/http:\/\/asc7ewkcvat2wsoi5yuwkej5ukyrqqnpnzpj4u34r2jxnoxhnbx6yqad\.onion/g' {} +
|
|
find . -type f -name "blog.atom" -exec sed -i 's/http:\/\/ass\.ryocafe\.site/http:\/\/ass\.asc7ewkcvat2wsoi5yuwkej5ukyrqqnpnzpj4u34r2jxnoxhnbx6yqad\.onion/g' {} +
|
|
find . -type f -name "blog.atom" -exec sed -i 's/http:\/\/pol\.ryocafe\.site/http:\/\/pol\.asc7ewkcvat2wsoi5yuwkej5ukyrqqnpnzpj4u34r2jxnoxhnbx6yqad\.onion/g' {} +
|
|
find . -type f -name "blog.atom" -exec sed -i 's/https:\/\/076\.moe/http:\/\/7dt6irsmfvbrtgn4nuah56kky6mvr472fbwwaltuxpf26qdqkdhfvnqd\.onion/g' {} +
|
|
|
|
find . -type f -name "twtxt.txt" -exec sed -i 's/http:\/\/ryocafe\.site/http:\/\/asc7ewkcvat2wsoi5yuwkej5ukyrqqnpnzpj4u34r2jxnoxhnbx6yqad\.onion/g' {} +
|
|
find . -type f -name "twtxt.txt" -exec sed -i 's/https:\/\/076\.moe/http:\/\/7dt6irsmfvbrtgn4nuah56kky6mvr472fbwwaltuxpf26qdqkdhfvnqd\.onion/g' {} +
|
|
cd ..
|
|
|
|
## I2P
|
|
cd i2p
|
|
find . -type f -name "*.html" -exec sed -i 's/http:\/\/ryocafe\.site/http:\/\/ryocafe\.i2p/g' {} +
|
|
find . -type f -name "*.html" -exec sed -i 's/http:\/\/ass\.ryocafe\.site/http:\/\/ass\.ryocafe\.i2p/g' {} +
|
|
find . -type f -name "*.html" -exec sed -i 's/http:\/\/pol\.ryocafe\.site/http:\/\/pol\.ryocafe\.i2p/g' {} +
|
|
find . -type f -name "*.html" -exec sed -i 's/https:\/\/076\.moe/http:\/\/076\.i2p/g' {} +
|
|
|
|
find . -type f -name "blog.atom" -exec sed -i 's/http:\/\/ryocafe\.site/http:\/\/ryocafe\.i2p/g' {} +
|
|
find . -type f -name "blog.atom" -exec sed -i 's/http:\/\/ass\.ryocafe\.site/http:\/\/ass\.ryocafe\.i2p/g' {} +
|
|
find . -type f -name "blog.atom" -exec sed -i 's/http:\/\/pol\.ryocafe\.site/http:\/\/pol\.ryocafe\.i2p/g' {} +
|
|
find . -type f -name "blog.atom" -exec sed -i 's/https:\/\/076\.moe/http:\/\/076\.i2p/g' {} +
|
|
|
|
find . -type f -name "twtxt.txt" -exec sed -i 's/http:\/\/ryocafe\.site/http:\/\/ryocafe\.i2p/g' {} +
|
|
find . -type f -name "twtxt.txt" -exec sed -i 's/https:\/\/076\.moe/http:\/\/076\.i2p/g' {} +
|
|
cd ..
|
|
|
|
## 両方同期
|
|
rsync -rtvzP tor $DARKNETSRV:/www/active/ryocafe.site
|
|
rsync -rtvzP i2p $DARKNETSRV:/www/active/ryocafe.site
|
|
|
|
# RSS and TWTXT for Clearnet
|
|
rsync -rtvzP i2p/blog.atom $CLEARNETSRV:/www/active/ryocafe.site/www
|
|
cd i2p && find . -type f -name "twtxt.txt" -exec sed -i 's/http:\/\/076\.i2p\/static\/asshole\.png/https:\/\/076\.moe\/static\/asshole\.png/g' {} + && cd ..
|
|
rsync -rtvzP i2p/twtxt.txt $CLEARNETSRV:/www/active/ryocafe.site/www
|
|
cd i2p && find . -type f -name "twtxt.txt" -exec sed -i 's/https:\/\/076\.moe\/static\/asshole\.png/http:\/\/076\.i2p\/static\/asshole\.png/g' {} + && cd ..
|