2024-01-04 03:16:59 +09:00
|
|
|
#!/bin/sh
|
|
|
|
|
2024-03-09 00:11:39 +09:00
|
|
|
UNAME=$(uname)
|
|
|
|
|
2024-01-04 03:16:59 +09:00
|
|
|
SRV=192.168.0.103
|
2024-01-30 12:48:27 +09:00
|
|
|
RSYNCOPT="-vaHz --delete"
|
2024-01-04 03:16:59 +09:00
|
|
|
HTTPHOME=/var/www/htdocs/technicalsuwako.moe
|
|
|
|
GMIHOME=/var/gemini/technicalsuwako.moe
|
|
|
|
|
|
|
|
# 創作
|
|
|
|
./gostatic config
|
|
|
|
./gostatic tuifig
|
|
|
|
mv www/index.html www/index.xhtml
|
|
|
|
mv txt/index.html txt/index.xhtml
|
|
|
|
|
|
|
|
# 画像など
|
|
|
|
rsync ${RSYNCOPT} ass ${SRV}:${HTTPHOME}
|
|
|
|
|
|
|
|
# ウエブサイト
|
|
|
|
## 一般ネット
|
|
|
|
### HTTP
|
|
|
|
rsync ${RSYNCOPT} www ${SRV}:${HTTPHOME}
|
|
|
|
rsync ${RSYNCOPT} txt ${SRV}:${HTTPHOME}
|
|
|
|
|
|
|
|
### Gemini
|
|
|
|
cp www/blog.atom gemini
|
|
|
|
cp www/twtxt.txt gemini
|
|
|
|
cd gemini
|
2024-03-09 00:11:39 +09:00
|
|
|
if [ "${UNAME}" = 'FreeBSD' ]; then
|
|
|
|
find . -type f -name "blog.atom" -exec sed -i '' -e 's/https:\/\/technicalsuwako\.moe/gemini:\/\/technicalsuwako\.moe/g' {} +
|
|
|
|
find . -type f -name "blog.atom" -exec sed -i '' -e 's/\.xhtml<\/id>/\.gmi<\/id>/g' {} +
|
|
|
|
find . -type f -name "blog.atom" -exec sed -i '' -e 's/\.xhtml" rel="alt/\.gmi" rel="alt/g' {} +
|
|
|
|
find . -type f -name "twtxt.txt" -exec sed -i '' -e 's/\/*$//' {} +
|
|
|
|
find . -type f -name "twtxt.txt" -exec sed -i '' -e 's/\.xhtml/\.gmi/g' {} +
|
|
|
|
find . -type f -name "twtxt.txt" -exec sed -i '' -e 's/https:\/\/technicalsuwako\.moe/gemini:\/\/technicalsuwako\.moe/g' {} +
|
|
|
|
find . -type f -name "twtxt.txt" -exec sed -i 's/https:\/\/076\.moe/gemini:\/\/076\.moe/g' {} +
|
|
|
|
else
|
|
|
|
find . -type f -name "blog.atom" -exec sed -i 's/https:\/\/technicalsuwako\.moe/gemini:\/\/technicalsuwako\.moe/g' {} +
|
|
|
|
find . -type f -name "blog.atom" -exec sed -i 's/\.xhtml<\/id>/\.gmi<\/id>/g' {} +
|
|
|
|
find . -type f -name "blog.atom" -exec sed -i 's/\.xhtml" rel="alt/\.gmi" rel="alt/g' {} +
|
|
|
|
find . -type f -name "twtxt.txt" -exec sed -i 's/\/*$//' {} +
|
|
|
|
find . -type f -name "twtxt.txt" -exec sed -i 's/\.xhtml/\.gmi/g' {} +
|
|
|
|
find . -type f -name "twtxt.txt" -exec sed -i 's/https:\/\/technicalsuwako\.moe/gemini:\/\/technicalsuwako\.moe/g' {} +
|
|
|
|
find . -type f -name "twtxt.txt" -exec sed -i 's/https:\/\/076\.moe/gemini:\/\/076\.moe/g' {} +
|
|
|
|
fi
|
2024-01-04 03:16:59 +09:00
|
|
|
cd ..
|
|
|
|
rsync ${RSYNCOPT} gemini/* ${SRV}:${GMIHOME}
|
|
|
|
|
|
|
|
## ダークネット
|
|
|
|
### Tor
|
|
|
|
cp -r www tor
|
|
|
|
cp -r txt ttor
|
|
|
|
cd tor
|
2024-03-09 00:11:39 +09:00
|
|
|
if [ "${UNAME}" = 'FreeBSD' ]; then
|
|
|
|
find . -type f -name "blog.atom" -exec sed -i '' -e 's/https:\/\/technicalsuwako\.moe/http:\/\/6qiatzlijtqo6giwvuhex5zgg3czzwrq5g6yick3stnn4xekw26zf7qd.onion/g' {} +
|
|
|
|
find . -type f -name "blog.atom" -exec sed -i '' -e 's/https:\/\/ass\.technicalsuwako\.moe/http:\/\/ass\.6qiatzlijtqo6giwvuhex5zgg3czzwrq5g6yick3stnn4xekw26zf7qd.onion/g' {} +
|
|
|
|
find . -type f -name "blog.atom" -exec sed -i '' -e 's/https:\/\/076\.moe/http:\/\/7dt6irsmfvbrtgn4nuah56kky6mvr472fbwwaltuxpf26qdqkdhfvnqd\.onion/g' {} +
|
|
|
|
find . -type f -name "twtxt.txt" -exec sed -i '' -e 's/https:\/\/technicalsuwako\.moe/http:\/\/6qiatzlijtqo6giwvuhex5zgg3czzwrq5g6yick3stnn4xekw26zf7qd.onion/g' {} +
|
|
|
|
find . -type f -name "twtxt.txt" -exec sed -i '' -e 's/https:\/\/ass\.technicalsuwako\.moe/http:\/\/ass\.6qiatzlijtqo6giwvuhex5zgg3czzwrq5g6yick3stnn4xekw26zf7qd.onion/g' {} +
|
|
|
|
find . -type f -name "twtxt.txt" -exec sed -i '' -e 's/https:\/\/076\.moe/http:\/\/7dt6irsmfvbrtgn4nuah56kky6mvr472fbwwaltuxpf26qdqkdhfvnqd\.onion/g' {} +
|
|
|
|
else
|
|
|
|
fi
|
|
|
|
find . -type f -name "blog.atom" -exec sed -i 's/https:\/\/technicalsuwako\.moe/http:\/\/6qiatzlijtqo6giwvuhex5zgg3czzwrq5g6yick3stnn4xekw26zf7qd.onion/g' {} +
|
|
|
|
find . -type f -name "blog.atom" -exec sed -i 's/https:\/\/ass\.technicalsuwako\.moe/http:\/\/ass\.6qiatzlijtqo6giwvuhex5zgg3czzwrq5g6yick3stnn4xekw26zf7qd.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/https:\/\/technicalsuwako\.moe/http:\/\/6qiatzlijtqo6giwvuhex5zgg3czzwrq5g6yick3stnn4xekw26zf7qd.onion/g' {} +
|
|
|
|
find . -type f -name "twtxt.txt" -exec sed -i 's/https:\/\/ass\.technicalsuwako\.moe/http:\/\/ass\.6qiatzlijtqo6giwvuhex5zgg3czzwrq5g6yick3stnn4xekw26zf7qd.onion/g' {} +
|
|
|
|
find . -type f -name "twtxt.txt" -exec sed -i 's/https:\/\/076\.moe/http:\/\/7dt6irsmfvbrtgn4nuah56kky6mvr472fbwwaltuxpf26qdqkdhfvnqd\.onion/g' {} +
|
2024-01-04 03:16:59 +09:00
|
|
|
cd ../ttor
|
2024-03-09 00:11:39 +09:00
|
|
|
if [ "${UNAME}" = 'FreeBSD' ]; then
|
|
|
|
find . -type f -name "blog.atom" -exec sed -i '' -e 's/https:\/\/technicalsuwako\.moe/http:\/\/6qiatzlijtqo6giwvuhex5zgg3czzwrq5g6yick3stnn4xekw26zf7qd.onion/g' {} +
|
|
|
|
find . -type f -name "blog.atom" -exec sed -i '' -e 's/https:\/\/ass\.technicalsuwako\.moe/http:\/\/ass\.6qiatzlijtqo6giwvuhex5zgg3czzwrq5g6yick3stnn4xekw26zf7qd.onion/g' {} +
|
|
|
|
find . -type f -name "blog.atom" -exec sed -i '' -e 's/https:\/\/076\.moe/http:\/\/7dt6irsmfvbrtgn4nuah56kky6mvr472fbwwaltuxpf26qdqkdhfvnqd\.onion/g' {} +
|
|
|
|
find . -type f -name "twtxt.txt" -exec sed -i '' -e 's/https:\/\/technicalsuwako\.moe/http:\/\/6qiatzlijtqo6giwvuhex5zgg3czzwrq5g6yick3stnn4xekw26zf7qd.onion/g' {} +
|
|
|
|
find . -type f -name "twtxt.txt" -exec sed -i '' -e 's/https:\/\/ass\.technicalsuwako\.moe/http:\/\/ass\.6qiatzlijtqo6giwvuhex5zgg3czzwrq5g6yick3stnn4xekw26zf7qd.onion/g' {} +
|
|
|
|
find . -type f -name "twtxt.txt" -exec sed -i '' -e 's/https:\/\/076\.moe/http:\/\/7dt6irsmfvbrtgn4nuah56kky6mvr472fbwwaltuxpf26qdqkdhfvnqd\.onion/g' {} +
|
|
|
|
else
|
|
|
|
find . -type f -name "blog.atom" -exec sed -i 's/https:\/\/technicalsuwako\.moe/http:\/\/6qiatzlijtqo6giwvuhex5zgg3czzwrq5g6yick3stnn4xekw26zf7qd.onion/g' {} +
|
|
|
|
find . -type f -name "blog.atom" -exec sed -i 's/https:\/\/ass\.technicalsuwako\.moe/http:\/\/ass\.6qiatzlijtqo6giwvuhex5zgg3czzwrq5g6yick3stnn4xekw26zf7qd.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/https:\/\/technicalsuwako\.moe/http:\/\/6qiatzlijtqo6giwvuhex5zgg3czzwrq5g6yick3stnn4xekw26zf7qd.onion/g' {} +
|
|
|
|
find . -type f -name "twtxt.txt" -exec sed -i 's/https:\/\/ass\.technicalsuwako\.moe/http:\/\/ass\.6qiatzlijtqo6giwvuhex5zgg3czzwrq5g6yick3stnn4xekw26zf7qd.onion/g' {} +
|
|
|
|
find . -type f -name "twtxt.txt" -exec sed -i 's/https:\/\/076\.moe/http:\/\/7dt6irsmfvbrtgn4nuah56kky6mvr472fbwwaltuxpf26qdqkdhfvnqd\.onion/g' {} +
|
|
|
|
fi
|
2024-01-04 03:16:59 +09:00
|
|
|
cd ..
|
|
|
|
rsync ${RSYNCOPT} tor "${SRV}:${HTTPHOME}"
|
|
|
|
rsync ${RSYNCOPT} ttor "${SRV}:${HTTPHOME}"
|
|
|
|
|
|
|
|
### I2P
|
|
|
|
cp -r www i2p
|
|
|
|
cp -r txt ti2p
|
|
|
|
cd i2p
|
2024-03-09 00:11:39 +09:00
|
|
|
if [ "${UNAME}" = 'FreeBSD' ]; then
|
|
|
|
find . -type f -name "blog.atom" -exec sed -i '' -e 's/https:\/\/technicalsuwako\.moe/http:\/\/technicalsuwako\.i2p/g' {} +
|
|
|
|
find . -type f -name "blog.atom" -exec sed -i '' -e 's/https:\/\/ass\.technicalsuwako\.moe/http:\/\/ass\.technicalsuwako\.i2p/g' {} +
|
|
|
|
find . -type f -name "blog.atom" -exec sed -i '' -e 's/https:\/\/076\.moe/http:\/\/076\.i2p/g' {} +
|
|
|
|
find . -type f -name "twtxt.txt" -exec sed -i '' -e 's/https:\/\/technicalsuwako\.moe/http:\/\/technicalsuwako\.i2p/g' {} +
|
|
|
|
find . -type f -name "twtxt.txt" -exec sed -i '' -e 's/https:\/\/ass\.technicalsuwako\.moe/http:\/\/ass\.technicalsuwako\.i2p/g' {} +
|
|
|
|
find . -type f -name "twtxt.txt" -exec sed -i '' -e 's/https:\/\/076\.moe/http:\/\/076\.i2p/g' {} +
|
|
|
|
else
|
|
|
|
find . -type f -name "blog.atom" -exec sed -i 's/https:\/\/technicalsuwako\.moe/http:\/\/technicalsuwako\.i2p/g' {} +
|
|
|
|
find . -type f -name "blog.atom" -exec sed -i 's/https:\/\/ass\.technicalsuwako\.moe/http:\/\/ass\.technicalsuwako\.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/https:\/\/technicalsuwako\.moe/http:\/\/technicalsuwako\.i2p/g' {} +
|
|
|
|
find . -type f -name "twtxt.txt" -exec sed -i 's/https:\/\/ass\.technicalsuwako\.moe/http:\/\/ass\.technicalsuwako\.i2p/g' {} +
|
|
|
|
find . -type f -name "twtxt.txt" -exec sed -i 's/https:\/\/076\.moe/http:\/\/076\.i2p/g' {} +
|
|
|
|
fi
|
2024-01-04 03:16:59 +09:00
|
|
|
cd ../ti2p
|
2024-03-09 00:11:39 +09:00
|
|
|
if [ "${UNAME}" = 'FreeBSD' ]; then
|
|
|
|
find . -type f -name "blog.atom" -exec sed -i '' -e 's/https:\/\/technicalsuwako\.moe/http:\/\/technicalsuwako\.i2p/g' {} +
|
|
|
|
find . -type f -name "blog.atom" -exec sed -i '' -e 's/https:\/\/ass\.technicalsuwako\.moe/http:\/\/ass\.technicalsuwako\.i2p/g' {} +
|
|
|
|
find . -type f -name "blog.atom" -exec sed -i '' -e 's/https:\/\/076\.moe/http:\/\/076\.i2p/g' {} +
|
|
|
|
find . -type f -name "twtxt.txt" -exec sed -i '' -e 's/https:\/\/technicalsuwako\.moe/http:\/\/technicalsuwako\.i2p/g' {} +
|
|
|
|
find . -type f -name "twtxt.txt" -exec sed -i '' -e 's/https:\/\/ass\.technicalsuwako\.moe/http:\/\/ass\.technicalsuwako\.i2p/g' {} +
|
|
|
|
find . -type f -name "twtxt.txt" -exec sed -i '' -e 's/https:\/\/076\.moe/http:\/\/076\.i2p/g' {} +
|
|
|
|
else
|
|
|
|
find . -type f -name "blog.atom" -exec sed -i 's/https:\/\/technicalsuwako\.moe/http:\/\/technicalsuwako\.i2p/g' {} +
|
|
|
|
find . -type f -name "blog.atom" -exec sed -i 's/https:\/\/ass\.technicalsuwako\.moe/http:\/\/ass\.technicalsuwako\.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/https:\/\/technicalsuwako\.moe/http:\/\/technicalsuwako\.i2p/g' {} +
|
|
|
|
find . -type f -name "twtxt.txt" -exec sed -i 's/https:\/\/ass\.technicalsuwako\.moe/http:\/\/ass\.technicalsuwako\.i2p/g' {} +
|
|
|
|
find . -type f -name "twtxt.txt" -exec sed -i 's/https:\/\/076\.moe/http:\/\/076\.i2p/g' {} +
|
|
|
|
fi
|
2024-01-04 03:16:59 +09:00
|
|
|
cd ..
|
|
|
|
rsync ${RSYNCOPT} i2p "${SRV}:${HTTPHOME}"
|
|
|
|
rsync ${RSYNCOPT} ti2p "${SRV}:${HTTPHOME}"
|
|
|
|
|
|
|
|
## 掃除
|
|
|
|
rm -rf www tor i2p txt ttor ti2p
|