mirror of
https://gitlab.com/octospacc/Configs.git
synced 2025-03-12 08:40:16 +01:00
upd
This commit is contained in:
parent
537ef4be7e
commit
72b99a6cbd
@ -39,7 +39,8 @@ mkcd ./Root
|
||||
CpSufx "etc/nginx/sites-available/*." conf old
|
||||
CpItem etc/tor/torrc
|
||||
for f in \
|
||||
matterbridge pixelfed_liminalgici FreshRSS-actualize \
|
||||
matterbridge FreshRSS-actualize \
|
||||
pixelfed_liminalgici SpaccBBS-NodeBB \
|
||||
Shiori ShioriFeed \
|
||||
RssToTelegramBot WinDog \
|
||||
TelegramIndex WebFileManager WuppiMini \
|
||||
|
@ -35,7 +35,7 @@ const ccencryptNow = async (File, BaseKey) => {
|
||||
//};
|
||||
|
||||
//const GitPullPush = async (user) => await ExecAs(`git pull; git add . && git commit -m "Auto-Backup ${Time}" && git push || true`, user);
|
||||
const GitReclone = async (path, url) => await $`rm -rf ${path}.old || true; mv ${path} ${path}.old; git clone --depth 1 ${url}`;
|
||||
const GitReclone = async (path, url, branch) => await $`rm -rf ${path}.old || true; mv ${path} ${path}.old; git clone --depth 1 --single-branch ${url} ${branch ? `--branch ${branch}` : ''}`;
|
||||
const GitPullPush = async () => await $`git pull; git add .; git commit -m "Auto-Backup ${Time}" || true; git push || true`;
|
||||
|
||||
const BackPathCrypt = async (Folder, Key, Ext) => {
|
||||
@ -60,7 +60,7 @@ const AltervistaFullBackup = async (domain) => {
|
||||
const [user, pass, key] = Secrets[`${domain.replaceAll('.', '_')}_Backup_Tokens`].split(':');
|
||||
cd(`./${domain}-Git`);
|
||||
await $`rclone sync ${domain}:/ ./www/wp-content/ --progress || true`;
|
||||
await $`curl -u ${user}:${pass} https://${domain}/wp-json/octt-export-rest/v1/xrss-export?token=${key} > ./WordPress.xml || true`;
|
||||
// await $`curl -u ${user}:${pass} https://${domain}/wp-json/octt-export-rest/v1/xrss-export?token=${key} > ./WordPress.xml || true`;
|
||||
await GitPullPush();
|
||||
};
|
||||
|
||||
@ -72,6 +72,12 @@ const LampBackup = async (folder, table) => {
|
||||
await $`ln -s "./Db.${Time.Stamp}.sql.tar.xz" ./${folder}/Db.Latest.sql.tar.xz`;
|
||||
};
|
||||
|
||||
const FolderGoCopyForCloud = async (src, dst) => {
|
||||
cd(`./${dst}`);
|
||||
await $`rm -rf ./${src} || true`;
|
||||
await $`cp -rp ../${src}/Latest.d ./${src}`;
|
||||
};
|
||||
|
||||
const Work = async (job) => await within(Jobs[job]);
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
@ -81,6 +87,9 @@ Jobs.Local_MiscSimpleBackups = async()=>{
|
||||
await SimpleBackup('n8n-data');
|
||||
await SimpleBackup('script-server');
|
||||
await SimpleBackup('docker-mailserver');
|
||||
await $`sudo docker stop memos`;
|
||||
await SimpleBackup('memos');
|
||||
await $`sudo docker start memos`;
|
||||
};
|
||||
|
||||
Jobs.Local_Shiori = async()=>{
|
||||
@ -101,12 +110,32 @@ Jobs.Local_liminalgici = async()=>{
|
||||
await LampBackup('pixelfed_liminalgici');
|
||||
};
|
||||
|
||||
Jobs.Local_Doku = async()=>{
|
||||
await SimpleBackup('dokuwiki', 'www');
|
||||
};
|
||||
|
||||
Jobs.Cloud_Doku = async()=>{
|
||||
await FolderGoCopyForCloud('dokuwiki', 'doku.spacc.eu.org-Git');
|
||||
await $`rm -rf ./dokuwiki/data/.git ./dokuwiki/data/cache || true`;
|
||||
await GitPullPush();
|
||||
};
|
||||
|
||||
Jobs.Mixed_OctospaccAltervista = async()=>{
|
||||
await AltervistaFullBackup('octospacc.altervista.org');
|
||||
$`rm -rf ./microblog-mirror/assets/uploads/*`;
|
||||
cd('./octospacc.altervista.org-Git/www/wp-content/uploads');
|
||||
$`cp -r $(seq 2020 $(date +%Y)) ../../../../microblog-mirror/assets/uploads/`;
|
||||
cd('../microblog-mirror');
|
||||
await $`rm -rf ./_posts ./assets/uploads/* || true`;
|
||||
cd('../octospacc.altervista.org-Git');
|
||||
await $`cp -r ./www/wp-content/octt-export-markdown/${Secrets.octospacc_altervista_org_MarkdownKey}/_posts ../microblog-mirror/_posts`;
|
||||
cd('./www/wp-content/uploads');
|
||||
await $`cp -r $(seq 2020 $(date +%Y)) ../../../../microblog-mirror/assets/uploads/ || true`;
|
||||
cd('../../../../microblog-mirror');
|
||||
await $`sh ./filter-fix-posts.sh`;
|
||||
await GitPullPush();
|
||||
};
|
||||
|
||||
Jobs.Mixed_Snippets = async () => {
|
||||
cd('./Snippets');
|
||||
await $`cp /Main/Server/www/Drive/Misc/Scripts/* ./`;
|
||||
await GitPullPush();
|
||||
};
|
||||
|
||||
@ -127,6 +156,7 @@ Jobs.Cloud_ServerBackupLimited = async()=>{
|
||||
await BackPathCrypt('n8n-data', Secrets.BackupKey_Git_n8n);
|
||||
await BackPathCrypt('script-server', Secrets.BackupKey_Git_scriptserver);
|
||||
await BackPathCrypt('docker-mailserver', Secrets.BackupKey_Git_dockermailserver);
|
||||
await BackPathCrypt('memos', Secrets.BackupKey_Git_memos);
|
||||
await GitPullPush();
|
||||
};
|
||||
|
||||
@ -185,9 +215,11 @@ $`echo Begin ${Time.Stamp} > ${BackupsBase}/Last.log`;
|
||||
await Work('Local_MiscSimpleBackups');
|
||||
await Work('Local_Shiori');
|
||||
await Work('Local_SpaccBBS');
|
||||
//await Work('Local_SpaccBBS_NodeBB');
|
||||
await Work('Local_liminalgici');
|
||||
//await Work('Local_Doku');
|
||||
await Work('Local_Doku');
|
||||
|
||||
//await Work('Mixed_Snippets');
|
||||
await Work('Mixed_OctospaccAltervista');
|
||||
//await Work('Mixed_SpacccraftAltervista');
|
||||
//await Work('Exter_WikiSpacc');
|
||||
@ -196,7 +228,7 @@ await Work('Cloud_ServerBackupLimited');
|
||||
await Work('Cloud_ArticlesBackupPrivate');
|
||||
await Work('Cloud_SpaccBBS');
|
||||
await Work('Cloud_liminalgici');
|
||||
//await Work('Cloud_Doku');
|
||||
await Work('Cloud_Doku');
|
||||
await Work('Cloud_SpaccCraft');
|
||||
await Work('Cloud_Private');
|
||||
|
||||
|
@ -10,7 +10,7 @@ done
|
||||
#Server \
|
||||
#Backup \
|
||||
|
||||
chown -R 1000:1000 /Main/Server/Desktop
|
||||
#chown -R 1000:1000 /Main/Server/Desktop
|
||||
|
||||
for Dir in \
|
||||
Backup/SpaccCraft \
|
||||
@ -22,7 +22,9 @@ done
|
||||
chown -R 100033:100033 /Main/Server/www
|
||||
chmod -R 777 /Main/Server/www
|
||||
|
||||
chmod -R 777 /Main/Server/Bots
|
||||
chmod -R 777 /Main/Server/WuppiMini
|
||||
chmod -R 777 /Main/Server/SpaccBBS-NodeBB
|
||||
|
||||
chown -R tux:tux /Main/Backup/
|
||||
chown -R tux:tux /Main/Clouds/octt/
|
||||
|
@ -14,7 +14,7 @@ while true; do
|
||||
-smbios type=4,manufacturer=Intel,max-speed=4800,current-speed=4800 \
|
||||
-cpu "host,family=6,model=158,stepping=2,model_id=Intel(R) Core(TM) i9-12900K CPU @ 2.60GHz,vmware-cpuid-freq=false,enforce=false,host-phys-bits=true,hypervisor=off" \
|
||||
-machine q35,kernel_irqchip=on \
|
||||
-smp 2 \
|
||||
-smp 3 \
|
||||
-m 3840M \
|
||||
-hda ./WindowsServer2022.qcow2 \
|
||||
-device e1000,netdev=net0 \
|
||||
|
@ -68,12 +68,45 @@ server {
|
||||
rewrite ^(.*)$ /install/app.php/$1 last;
|
||||
}
|
||||
|
||||
location /new { #~ ^/(new$|new/) {
|
||||
proxy_http_version 1.1;
|
||||
proxy_pass http://localhost:4567;
|
||||
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";
|
||||
sub_filter '<noscript>' '<div class="SpaccBBS-Alpha-Header alert alert-warning">La nuova BBS è in fase Alpha. I post precedenti al 22 luglio 2024 potrebbero non essere trasferibili, ma rimarranno disponibili per la lettura su <a href="/old/">/old/</a>.</div><noscript>';
|
||||
sub_filter_once on;
|
||||
|
||||
location /new/new/assets/ {
|
||||
proxy_pass http://localhost:4567/new/assets/;
|
||||
}
|
||||
}
|
||||
|
||||
location /.well-known/webfinger {
|
||||
proxy_http_version 1.1;
|
||||
proxy_pass http://localhost:4567/new/.well-known/webfinger;
|
||||
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";
|
||||
}
|
||||
|
||||
location ~ ^/(shoutbox$|shoutbox/)$ {
|
||||
rewrite ^ $scheme://$host/new/shoutbox/ redirect;
|
||||
}
|
||||
|
||||
# Deny access to version control system directories.
|
||||
location ~ /\.svn|/\.git {
|
||||
deny all;
|
||||
internal;
|
||||
}
|
||||
|
||||
location /old {
|
||||
rewrite ^ $scheme://$host/ redirect;
|
||||
}
|
||||
location /wap {
|
||||
rewrite ^ $scheme://$host/?style=4 redirect;
|
||||
}
|
||||
@ -81,16 +114,6 @@ server {
|
||||
rewrite ^ $scheme://$host/wap redirect;
|
||||
}
|
||||
|
||||
#if ($SpaccBbsMap = '1') {
|
||||
# location /wwwroot {
|
||||
# rewrite ^(.*) $scheme://hlb0.octt.eu.org/$request_uri redirect;
|
||||
# }
|
||||
#}
|
||||
#if ($SpaccBbsMap = '2') {
|
||||
# location /wwwroot {
|
||||
# rewrite ^(.*) $scheme://octt.spaccsoj3trhzowrrblzb5m6hgkwu6syghnmhett7gvxbrz5zhsrs4ad.onion/$request_uri redirect;
|
||||
# }
|
||||
#}
|
||||
location /wwwroot {
|
||||
if ($SpaccBbsMap = '1') {
|
||||
rewrite ^(.*) $scheme://hlb0.octt.eu.org/$request_uri redirect;
|
||||
|
20
Server/Root/etc/nginx/sites-available/WinDog.conf
Normal file
20
Server/Root/etc/nginx/sites-available/WinDog.conf
Normal file
@ -0,0 +1,20 @@
|
||||
server {
|
||||
listen 80;
|
||||
listen 443 ssl;
|
||||
server_name WinDog.octt.eu.org WinDog.spaccsoj3trhzowrrblzb5m6hgkwu6syghnmhett7gvxbrz5zhsrs4ad.onion;
|
||||
ssl_certificate /etc/letsencrypt/live/windog.octt.eu.org/fullchain.pem;
|
||||
ssl_certificate_key /etc/letsencrypt/live/windog.octt.eu.org/privkey.pem;
|
||||
ssl_prefer_server_ciphers on;
|
||||
error_log /var/log/nginx/WinDog.error.log;
|
||||
access_log /var/log/nginx/WinDog.access.log;
|
||||
location / {
|
||||
proxy_http_version 1.1;
|
||||
proxy_buffering off;
|
||||
proxy_pass http://localhost:30264;
|
||||
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";
|
||||
}
|
||||
}
|
@ -1,6 +1,7 @@
|
||||
server {
|
||||
#listen 80;
|
||||
listen 443 ssl http2;
|
||||
listen [::]:443 ssl http2;
|
||||
#listen [::]:443 ssl http2;
|
||||
server_name liminalgici.spacc.eu.org liminalgici.spaccsoj3trhzowrrblzb5m6hgkwu6syghnmhett7gvxbrz5zhsrs4ad.onion;
|
||||
root /Main/Server/www/pixelfed_liminalgici/public; # path to repo/public
|
||||
ssl_certificate /etc/letsencrypt/live/liminalgici.spacc.eu.org/fullchain.pem;
|
||||
|
40
Server/Root/etc/nginx/sites-available/memos.conf
Normal file
40
Server/Root/etc/nginx/sites-available/memos.conf
Normal file
@ -0,0 +1,40 @@
|
||||
map $http_x_noproxy $proxy_pass_backend {
|
||||
default http://127.0.0.1/MemosYacyBridgeCreate.php?endpoint=$1;
|
||||
1 http://192.168.1.125:5230/memos.api.v1.MemoService/$1;
|
||||
}
|
||||
|
||||
server {
|
||||
listen 80;
|
||||
listen 443 ssl;
|
||||
server_name memos.octt.eu.org memos.spaccsoj3trhzowrrblzb5m6hgkwu6syghnmhett7gvxbrz5zhsrs4ad.onion;
|
||||
ssl_certificate /etc/letsencrypt/live/memos.octt.eu.org/fullchain.pem;
|
||||
ssl_certificate_key /etc/letsencrypt/live/memos.octt.eu.org/privkey.pem;
|
||||
ssl_prefer_server_ciphers on;
|
||||
error_log /var/log/nginx/memos.error.log;
|
||||
access_log /var/log/nginx/memos.access.log;
|
||||
location / {
|
||||
proxy_http_version 1.1;
|
||||
proxy_pass http://192.168.1.125:5230;
|
||||
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";
|
||||
}
|
||||
location /nojs {
|
||||
proxy_pass http://127.0.0.1/MemosViewer.php;
|
||||
proxy_set_header Host hlb0.octt.eu.org;
|
||||
}
|
||||
location /m/ {
|
||||
#rewrite ^\/m\/(.*) $scheme://hlb0.octt.eu.org/MemosViewer.php?uid=$1 permanent;
|
||||
proxy_pass http://127.0.0.1/MemosViewer.php?structure=original&uid=;
|
||||
proxy_set_header Host hlb0.octt.eu.org;
|
||||
}
|
||||
location ~ ^/memos.api.v1.MemoService/(CreateMemo|UpdateMemo)$ {
|
||||
proxy_pass $proxy_pass_backend;
|
||||
proxy_set_header Host hlb0.octt.eu.org;
|
||||
}
|
||||
location /assets/index-CupmbTt3.js {
|
||||
return 301 $scheme://hlb0.octt.eu.org/Res/Memos/fix-2024-06-03/index-01f381cb-D3gN5Bpo.js;
|
||||
}
|
||||
}
|
19
Server/Root/etc/nginx/sites-available/yacy.conf
Normal file
19
Server/Root/etc/nginx/sites-available/yacy.conf
Normal file
@ -0,0 +1,19 @@
|
||||
server {
|
||||
listen 80;
|
||||
listen 443 ssl;
|
||||
server_name yacy.spacc.eu.org yacy.spaccsoj3trhzowrrblzb5m6hgkwu6syghnmhett7gvxbrz5zhsrs4ad.onion;
|
||||
ssl_certificate /etc/letsencrypt/live/yacy.spacc.eu.org/fullchain.pem;
|
||||
ssl_certificate_key /etc/letsencrypt/live/yacy.spacc.eu.org/privkey.pem;
|
||||
ssl_prefer_server_ciphers on;
|
||||
error_log /var/log/nginx/yacy.error.log;
|
||||
access_log /var/log/nginx/yacy.access.log;
|
||||
location / {
|
||||
proxy_http_version 1.1;
|
||||
proxy_pass http://192.168.1.125:8090;
|
||||
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";
|
||||
}
|
||||
}
|
@ -5,5 +5,5 @@ WantedBy=default.target
|
||||
Description=BackupAll.timer
|
||||
|
||||
[Timer]
|
||||
OnCalendar=*-*-2,5,8,11,14,17,20,23,26,29 00:03:00
|
||||
OnCalendar=*-*-2,5,8,11,14,17,20,23,26,29 03:00:00
|
||||
Unit=BackupAll.service
|
||||
|
11
Server/Root/etc/systemd/system/SpaccBBS-NodeBB.service
Normal file
11
Server/Root/etc/systemd/system/SpaccBBS-NodeBB.service
Normal file
@ -0,0 +1,11 @@
|
||||
[Unit]
|
||||
Description=SpaccBBS-NodeBB
|
||||
After=network.target
|
||||
[Service]
|
||||
Type=simple
|
||||
Restart=always
|
||||
RestartSec=10
|
||||
User=tux
|
||||
ExecStart=/Main/Server/SpaccBBS-NodeBB/RunNodeBB.sh
|
||||
[Install]
|
||||
WantedBy=multi-user.target
|
Loading…
x
Reference in New Issue
Block a user