mirror of
https://gitlab.com/octospacc/Configs.git
synced 2025-04-15 18:07:27 +02:00
Upd
This commit is contained in:
parent
e2bf7bca71
commit
d139b218b9
6
Lib.sh
6
Lib.sh
@ -18,8 +18,7 @@ CpItem(){
|
|||||||
|
|
||||||
CpItems(){
|
CpItems(){
|
||||||
for p in $@
|
for p in $@
|
||||||
do
|
do CpItem "$p"
|
||||||
CpItem "$p"
|
|
||||||
done
|
done
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -27,8 +26,7 @@ CpSub(){
|
|||||||
LBase="$1"; shift
|
LBase="$1"; shift
|
||||||
RBase="$1"; shift
|
RBase="$1"; shift
|
||||||
for s in $@
|
for s in $@
|
||||||
do
|
do CpItems /${LBase}${s}${RBase}
|
||||||
CpItems ${LBase}${s}${RBase}
|
|
||||||
done
|
done
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1,6 +1,7 @@
|
|||||||
#!/bin/sh
|
#!/bin/sh
|
||||||
# Upload a backup of the Local Cloud and of local services backups to other clouds
|
# Upload a backup of the Local Cloud and of local services backups to other clouds
|
||||||
|
|
||||||
|
set -e
|
||||||
. "$(dirname "$(realpath "$0")")/BackupGlobals.cfg"
|
. "$(dirname "$(realpath "$0")")/BackupGlobals.cfg"
|
||||||
|
|
||||||
GitPush() {
|
GitPush() {
|
||||||
@ -37,13 +38,34 @@ EchoExec cp -rp "../shiori-data/Latest.d" "./shiori-data"
|
|||||||
GitPush
|
GitPush
|
||||||
cd ..
|
cd ..
|
||||||
|
|
||||||
#McServer="SpaccCraft"
|
exit
|
||||||
#McEdition="Beta-1.7.3"
|
|
||||||
#cd "/Server/${McServer}/spacccraft-b1.7.3-backup4"
|
cd ./SpaccBBS-Backup-phpBB-2023
|
||||||
#cp ../*.sh ./
|
EchoExec rm -rf ./SpaccBBS || true
|
||||||
#cp -rT "${BackupsBase}/${McServer}/${McEdition}/Latest" "./${McEdition}"
|
EchoExec cp -rp ../SpaccBBS/Latest.d ./SpaccBBS
|
||||||
#GitPush
|
EchoExec cp ../SpaccBBS/Db.Latest.sql.tar.xz ./Db.sql.tar.xz
|
||||||
#cd "${BackupsBase}"
|
for File in \
|
||||||
|
./Db.sql.tar.xz \
|
||||||
|
./SpaccBBS/config.php \
|
||||||
|
./SpaccBBS/arrowchat/includes/config.php \
|
||||||
|
; do ccencryptNow "$File" "$BackupKey_Git_SpaccBBS"
|
||||||
|
done
|
||||||
|
GitPush
|
||||||
|
cd ..
|
||||||
|
|
||||||
|
McServer="SpaccCraft"
|
||||||
|
McEdition="Beta-1.7.3"
|
||||||
|
McGit="spacccraft-b1.7.3-backup4"
|
||||||
|
DestPath="${BackupsBase}/${McServer}/${McGit}"
|
||||||
|
if [ -d "${DestPath}" ]
|
||||||
|
then
|
||||||
|
#cd "/Server/${McServer}"
|
||||||
|
cd "${BackupsBase}/${McServer}"
|
||||||
|
rm -rf "${DestPath}/${McEdition}"
|
||||||
|
cp ./*.sh "${DestPath}/"
|
||||||
|
cp -r "./${McEdition}/Latest.d" "${DestPath}/${McEdition}"
|
||||||
|
GitPullPushPath "${DestPath}"
|
||||||
|
fi
|
||||||
|
|
||||||
GitPullPushPath "/Cloud/Repos/Personal-Game-Saves"
|
GitPullPushPath "/Cloud/Repos/Personal-Game-Saves"
|
||||||
#GitPullPushPath "/media/Disk/Configs"
|
#GitPullPushPath "/media/Disk/Configs"
|
||||||
|
@ -1,14 +1,18 @@
|
|||||||
#!/bin/sh
|
#!/bin/sh
|
||||||
# Make local backups of our data from various third-party services
|
# Make local backups of our data from various third-party services
|
||||||
|
|
||||||
|
set -e
|
||||||
. "$(dirname "$(realpath "$0")")/BackupGlobals.cfg"
|
. "$(dirname "$(realpath "$0")")/BackupGlobals.cfg"
|
||||||
|
|
||||||
# Invidious personal JSON dump
|
# Invidious personal JSON dump
|
||||||
|
InvidiousPersonalJsonDump(){
|
||||||
Name="Invidious-User"
|
Name="Invidious-User"
|
||||||
mkdir -vp "./${Name}"
|
mkdir -vp "./${Name}"
|
||||||
curl \
|
curl \
|
||||||
"${Invidious_Backup_URL}/subscription_manager?action_takeout=1&format=json" \
|
"${Invidious_Backup_URL}/subscription_manager?action_takeout=1&format=json" \
|
||||||
-H "${Invidious_Backup_Cookie}" \
|
-H "${Invidious_Backup_Cookie}" \
|
||||||
| 7z a -mmt1 -mx9 "./${Name}/${RunDate}.7z" -si && cp -v "./${Name}/${RunDate}.7z" "./${Name}/Latest.7z"
|
| 7z a -mmt1 -mx9 "./${Name}/${RunDate}.7z" -si && cp -v "./${Name}/${RunDate}.7z" "./${Name}/Latest.7z"
|
||||||
|
}
|
||||||
|
|
||||||
|
#InvidiousPersonalJsonDump
|
||||||
WriteLastLog
|
WriteLastLog
|
||||||
|
@ -1,25 +1,37 @@
|
|||||||
#!/bin/sh
|
#!/bin/sh
|
||||||
# Make local backups of the data from the hosted services
|
# Make local backups of the data from the hosted services
|
||||||
|
|
||||||
|
set -e
|
||||||
. "$(dirname "$(realpath "$0")")/BackupGlobals.cfg"
|
. "$(dirname "$(realpath "$0")")/BackupGlobals.cfg"
|
||||||
|
|
||||||
SimpleBackup() {
|
SimpleCompress(){
|
||||||
|
EchoExec tar cJSf "$1.tar.xz" "$2"
|
||||||
|
}
|
||||||
|
|
||||||
|
SimpleBackup(){
|
||||||
# $1: Folder
|
# $1: Folder
|
||||||
# $2: Optional prefix relative to path in /Server
|
# $2: Optional prefix relative to path in /Server
|
||||||
mkdir -vp "./$1"
|
mkdir -vp "./$1"
|
||||||
#tar cvJSf "./$1/${RunDate}.tar.xz" "/Server/$2/$1" && \
|
#tar cvJSf "./$1/${RunDate}.tar.xz" "/Server/$2/$1" && \
|
||||||
#cp "./$1/${RunDate}.tar.xz" "./$1/Latest.tar.xz"
|
#cp "./$1/${RunDate}.tar.xz" "./$1/Latest.tar.xz"
|
||||||
EchoExec rm -rf "./$1/Latest.d"
|
EchoExec rm "./$1/Latest.tar.xz" || true
|
||||||
|
EchoExec rm -rf "./$1/Latest.d" || true
|
||||||
EchoExec cp -rp "/Server/$2/$1" "./$1/Latest.d"
|
EchoExec cp -rp "/Server/$2/$1" "./$1/Latest.d"
|
||||||
EchoExec tar cJSf "./$1/${RunDate}.tar.xz" "./$1/Latest.d" && \
|
SimpleCompress "./$1/${RunDate}" "./$1/Latest.d"
|
||||||
cp -v "./$1/${RunDate}.tar.xz" "./$1/Latest.tar.xz"
|
#cp -v "./$1/${RunDate}.tar.xz" "./$1/Latest.tar.xz"
|
||||||
|
EchoExec ln -s "./${RunDate}.tar.xz" "./$1/Latest.tar.xz"
|
||||||
}
|
}
|
||||||
|
|
||||||
#SimpleBackup "wallabag-data"
|
#SimpleBackup "wallabag-data"
|
||||||
SimpleBackup "FreshRSS-data"
|
SimpleBackup "FreshRSS-data"
|
||||||
|
|
||||||
SimpleBackup "shiori-data" "Shiori"
|
SimpleBackup "shiori-data" "Shiori"
|
||||||
rm -v "./shiori-data/Latest.d/archive/*"
|
rm -v ./shiori-data/Latest.d/archive/* || true
|
||||||
|
|
||||||
|
SimpleBackup SpaccBBS www
|
||||||
|
EchoExec mariadb-dump phpBB > ./SpaccBBS/Db.Latest.sql
|
||||||
|
SimpleCompress "./SpaccBBS/Db.${RunDate}.sql" ./SpaccBBS/Db.Latest.sql
|
||||||
|
EchoExec ln -s "./Db.${RunDate}.sql.tar.xz" ./SpaccBBS/Db.Latest.sql.tar.xz
|
||||||
|
|
||||||
# GoToSocial
|
# GoToSocial
|
||||||
#Name="GoToSocial"
|
#Name="GoToSocial"
|
||||||
|
@ -1,6 +1,7 @@
|
|||||||
#!/bin/sh
|
#!/bin/sh
|
||||||
cd "$( dirname "$( realpath "$0" )" )"
|
cd "$( dirname "$( realpath "$0" )" )"
|
||||||
|
|
||||||
|
sh -c 'while true; do echo "nameserver 127.0.0.1" > /etc/resolv.conf; sleep 30; done' &
|
||||||
sh ./MountRoots.sh &
|
sh ./MountRoots.sh &
|
||||||
|
|
||||||
while true; do sleep 30; done
|
while true; do sleep 30; done
|
||||||
|
75
Server/Root/etc/nginx/sites-available/SpaccBBS.conf
Normal file
75
Server/Root/etc/nginx/sites-available/SpaccBBS.conf
Normal file
@ -0,0 +1,75 @@
|
|||||||
|
upstream php {
|
||||||
|
server unix:/var/run/php/php7.4-fpm.sock;
|
||||||
|
}
|
||||||
|
|
||||||
|
server {
|
||||||
|
listen 80;
|
||||||
|
listen 443 ssl;
|
||||||
|
server_name bbs.spacc.eu.org;
|
||||||
|
ssl_certificate /etc/letsencrypt/live/bbs.spacc.eu.org/fullchain.pem;
|
||||||
|
ssl_certificate_key /etc/letsencrypt/live/bbs.spacc.eu.org/privkey.pem;
|
||||||
|
ssl_prefer_server_ciphers on;
|
||||||
|
root /Server/www/SpaccBBS;
|
||||||
|
index index.php index.html index.htm;
|
||||||
|
|
||||||
|
# Loggers
|
||||||
|
error_log /var/log/nginx/SpaccBBS.error.log warn;
|
||||||
|
access_log /var/log/nginx/SpaccBBS.access.log;
|
||||||
|
|
||||||
|
location / {
|
||||||
|
try_files $uri $uri/ @rewriteapp;
|
||||||
|
|
||||||
|
# Pass the php scripts to FastCGI server specified in upstream declaration.
|
||||||
|
location ~ \.php(/|$) {
|
||||||
|
include fastcgi.conf;
|
||||||
|
fastcgi_split_path_info ^(.+\.php)(/.*)$;
|
||||||
|
fastcgi_param PATH_INFO $fastcgi_path_info;
|
||||||
|
fastcgi_param SCRIPT_FILENAME $realpath_root$fastcgi_script_name;
|
||||||
|
fastcgi_param DOCUMENT_ROOT $realpath_root;
|
||||||
|
try_files $uri $uri/ /app.php$is_args$args;
|
||||||
|
fastcgi_pass php;
|
||||||
|
}
|
||||||
|
|
||||||
|
# Deny access to internal phpbb files.
|
||||||
|
location ~ /(config\.php|common\.php|cache|files|images/avatars/upload|install.bak|(?<!ext/)phpbb(?!\w+)|store|vendor) {
|
||||||
|
deny all;
|
||||||
|
# deny was ignored before 0.8.40 for connections over IPv6.
|
||||||
|
# Use internal directive to prohibit access on older versions.
|
||||||
|
internal;
|
||||||
|
}
|
||||||
|
location /includes {
|
||||||
|
deny all;
|
||||||
|
internal;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
location @rewriteapp {
|
||||||
|
rewrite ^(.*)$ /app.php/$1 last;
|
||||||
|
}
|
||||||
|
|
||||||
|
# Correctly pass scripts for installer
|
||||||
|
location /install/ {
|
||||||
|
try_files $uri $uri/ @rewrite_installapp =404;
|
||||||
|
|
||||||
|
# Pass the php scripts to fastcgi server specified in upstream declaration.
|
||||||
|
location ~ \.php(/|$) {
|
||||||
|
include fastcgi.conf;
|
||||||
|
fastcgi_split_path_info ^(.+\.php)(/.*)$;
|
||||||
|
fastcgi_param PATH_INFO $fastcgi_path_info;
|
||||||
|
fastcgi_param SCRIPT_FILENAME $realpath_root$fastcgi_script_name;
|
||||||
|
fastcgi_param DOCUMENT_ROOT $realpath_root;
|
||||||
|
try_files $uri $uri/ /install/app.php$is_args$args =404;
|
||||||
|
fastcgi_pass php;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
location @rewrite_installapp {
|
||||||
|
rewrite ^(.*)$ /install/app.php/$1 last;
|
||||||
|
}
|
||||||
|
|
||||||
|
# Deny access to version control system directories.
|
||||||
|
location ~ /\.svn|/\.git {
|
||||||
|
deny all;
|
||||||
|
internal;
|
||||||
|
}
|
||||||
|
}
|
62
Server/Root/etc/nginx/sites-available/XSpacc.conf
Normal file
62
Server/Root/etc/nginx/sites-available/XSpacc.conf
Normal file
@ -0,0 +1,62 @@
|
|||||||
|
server {
|
||||||
|
listen 443 ssl;
|
||||||
|
server_name x.spacc.eu.org;
|
||||||
|
ssl_certificate /etc/letsencrypt/live/x.spacc.eu.org/fullchain.pem;
|
||||||
|
ssl_certificate_key /etc/letsencrypt/live/x.spacc.eu.org/privkey.pem;
|
||||||
|
ssl_prefer_server_ciphers on;
|
||||||
|
location / {
|
||||||
|
root /Server/www/XSpacc;
|
||||||
|
if ($request_uri ~ ^([^.\?]*[^/])$) {
|
||||||
|
return 301 $1/;
|
||||||
|
}
|
||||||
|
try_files $uri $uri/ $uri.html;
|
||||||
|
autoindex off;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
server {
|
||||||
|
listen 443 ssl;
|
||||||
|
server_name graph.x.spacc.eu.org;
|
||||||
|
ssl_certificate /etc/letsencrypt/live/graph.x.spacc.eu.org/fullchain.pem;
|
||||||
|
ssl_certificate_key /etc/letsencrypt/live/graph.x.spacc.eu.org/privkey.pem;
|
||||||
|
ssl_prefer_server_ciphers on;
|
||||||
|
location / {
|
||||||
|
proxy_http_version 1.1;
|
||||||
|
proxy_pass https://149.154.164.13:443;
|
||||||
|
proxy_set_header Host telegra.ph;
|
||||||
|
proxy_set_header X-Real-IP $remote_addr;
|
||||||
|
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
|
||||||
|
proxy_set_header X-Forwarded-Proto $scheme;
|
||||||
|
proxy_set_header Upgrade $http_upgrade;
|
||||||
|
proxy_set_header Connection "upgrade";
|
||||||
|
proxy_set_header Accept-Encoding ''; # Needed for sub_filter
|
||||||
|
sub_filter '<body>' '<body><link rel="stylesheet" href="//x.spacc.eu.org/x.css"/><p class="x-spacc">Content Proxied from <a href="//x.spacc.eu.org">X by Spacc Inc.</a> — <a href="//telegra.ph$request_uri">Upstream</a></p>';
|
||||||
|
sub_filter_once off;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
server {
|
||||||
|
listen 443 ssl;
|
||||||
|
server_name reddit.x.spacc.eu.org;
|
||||||
|
ssl_certificate /etc/letsencrypt/live/reddit.x.spacc.eu.org/fullchain.pem;
|
||||||
|
ssl_certificate_key /etc/letsencrypt/live/reddit.x.spacc.eu.org/privkey.pem;
|
||||||
|
ssl_prefer_server_ciphers on;
|
||||||
|
location / {
|
||||||
|
proxy_http_version 1.1;
|
||||||
|
proxy_pass https://old.reddit.com;
|
||||||
|
proxy_set_header Host old.reddit.com;
|
||||||
|
proxy_set_header X-Real-IP $remote_addr;
|
||||||
|
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
|
||||||
|
proxy_set_header X-Forwarded-Proto $scheme;
|
||||||
|
proxy_set_header Upgrade $http_upgrade;
|
||||||
|
proxy_set_header Connection "upgrade";
|
||||||
|
proxy_set_header Accept-Encoding ''; # Needed for sub_filter
|
||||||
|
sub_filter '</head>' '<meta name="viewport" content="width=device-width, initial-scale=1.0"/></head>';
|
||||||
|
sub_filter '<body ' '<body><link rel="stylesheet" href="//x.spacc.eu.org/reddit.css"/><p class="x-spacc">Content Proxied from <a href="//x.spacc.eu.org">X by Spacc Inc.</a> — <a href="//old.reddit.com$request_uri">Upstream</a></p><meta ';
|
||||||
|
sub_filter '<a href="https://old.reddit.com/' '<a href="/';
|
||||||
|
sub_filter '<script>' '<delscript>';
|
||||||
|
sub_filter '<script ' '<delscript ';
|
||||||
|
sub_filter '</script>' '</delscript>';
|
||||||
|
sub_filter_once off;
|
||||||
|
}
|
||||||
|
}
|
@ -6,7 +6,7 @@ server {
|
|||||||
ssl_prefer_server_ciphers on;
|
ssl_prefer_server_ciphers on;
|
||||||
location / {
|
location / {
|
||||||
proxy_http_version 1.1;
|
proxy_http_version 1.1;
|
||||||
proxy_pass http://localhost:8331;
|
proxy_pass http://192.168.1.157:8311;
|
||||||
proxy_set_header Host $host;
|
proxy_set_header Host $host;
|
||||||
proxy_set_header X-Real-IP $remote_addr;
|
proxy_set_header X-Real-IP $remote_addr;
|
||||||
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
|
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
|
||||||
@ -16,6 +16,14 @@ server {
|
|||||||
sub_filter '</body>' '<link rel="stylesheet" href="/fediii-static/Kbin.css"/><script src="/fediii-static/Kbin.js"></script></body>';
|
sub_filter '</body>' '<link rel="stylesheet" href="/fediii-static/Kbin.css"/><script src="/fediii-static/Kbin.js"></script></body>';
|
||||||
sub_filter_once on;
|
sub_filter_once on;
|
||||||
}
|
}
|
||||||
|
location /.well-known/mercure {
|
||||||
|
proxy_pass http://192.168.1.157:3000$request_uri;
|
||||||
|
proxy_http_version 1.1;
|
||||||
|
proxy_set_header Connection "";
|
||||||
|
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
|
||||||
|
proxy_set_header X-Forwarded-Host $host;
|
||||||
|
proxy_set_header X-Forwarded-Proto $scheme;
|
||||||
|
}
|
||||||
location /fediii-static/ {
|
location /fediii-static/ {
|
||||||
root /Server/www/;
|
root /Server/www/;
|
||||||
add_header Access-Control-Allow-Origin *;
|
add_header Access-Control-Allow-Origin *;
|
||||||
|
16
Server/Root/etc/nginx/sites-available/wordpress.conf
Normal file
16
Server/Root/etc/nginx/sites-available/wordpress.conf
Normal file
@ -0,0 +1,16 @@
|
|||||||
|
server {
|
||||||
|
listen 443 ssl;
|
||||||
|
server_name wp-testing.octt.eu.org;
|
||||||
|
ssl_certificate /etc/letsencrypt/live/wp-testing.octt.eu.org/fullchain.pem;
|
||||||
|
ssl_certificate_key /etc/letsencrypt/live/wp-testing.octt.eu.org/privkey.pem;
|
||||||
|
ssl_prefer_server_ciphers on;
|
||||||
|
location / {
|
||||||
|
proxy_http_version 1.1;
|
||||||
|
proxy_pass http://192.168.1.157:8048;
|
||||||
|
proxy_set_header X-Real-IP $remote_addr;
|
||||||
|
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
|
||||||
|
proxy_set_header X-Forwarded-Proto $scheme;
|
||||||
|
proxy_set_header Upgrade $http_upgrade;
|
||||||
|
proxy_set_header Connection "upgrade";
|
||||||
|
}
|
||||||
|
}
|
@ -7,6 +7,6 @@ Type=simple
|
|||||||
Restart=always
|
Restart=always
|
||||||
RestartSec=15
|
RestartSec=15
|
||||||
User=pi
|
User=pi
|
||||||
ExecStart=/Server/CringeInoltro/StartCringeInoltro.py
|
ExecStart=/Server/Bots/CringeInoltro/StartCringeInoltro.py
|
||||||
[Install]
|
[Install]
|
||||||
WantedBy=multi-user.target
|
WantedBy=multi-user.target
|
||||||
|
@ -6,8 +6,8 @@ StartLimitIntervalSec=0
|
|||||||
Type=simple
|
Type=simple
|
||||||
Restart=always
|
Restart=always
|
||||||
RestartSec=10
|
RestartSec=10
|
||||||
CPUQuota=75%
|
#CPUQuota=75%
|
||||||
MemoryMax=350M
|
#MemoryMax=384M
|
||||||
User=pi
|
User=pi
|
||||||
ExecStart=script /dev/null -c "export TERM=vt100; screen -S SpaccCraft sh /Server/SpaccCraft/StartSpaccCraft.sh"
|
ExecStart=script /dev/null -c "export TERM=vt100; screen -S SpaccCraft sh /Server/SpaccCraft/StartSpaccCraft.sh"
|
||||||
[Install]
|
[Install]
|
||||||
|
@ -7,6 +7,6 @@ Type=simple
|
|||||||
Restart=always
|
Restart=always
|
||||||
RestartSec=10
|
RestartSec=10
|
||||||
User=pi
|
User=pi
|
||||||
ExecStart=/Server/WinDog/StartWinDog
|
ExecStart=/Server/Bots/WinDog/StartWinDog
|
||||||
[Install]
|
[Install]
|
||||||
WantedBy=multi-user.target
|
WantedBy=multi-user.target
|
||||||
|
Loading…
x
Reference in New Issue
Block a user