mirror of
https://gitlab.com/octospacc/Configs.git
synced 2025-02-01 14:36:55 +01:00
.
This commit is contained in:
parent
ca74402253
commit
1389c5bdbc
0
.gitignore
vendored
Normal file → Executable file
0
.gitignore
vendored
Normal file → Executable file
0
Desktop/Home/.config/i3/config
Normal file → Executable file
0
Desktop/Home/.config/i3/config
Normal file → Executable file
0
Desktop/Home/.config/i3status/config
Normal file → Executable file
0
Desktop/Home/.config/i3status/config
Normal file → Executable file
0
Misc/Home/.bashrc.part.tail
Normal file → Executable file
0
Misc/Home/.bashrc.part.tail
Normal file → Executable file
0
Misc/Home/.config/micro/settings.json
Normal file → Executable file
0
Misc/Home/.config/micro/settings.json
Normal file → Executable file
0
Misc/Home/.dotfiles/aliasrc
Normal file → Executable file
0
Misc/Home/.dotfiles/aliasrc
Normal file → Executable file
0
Misc/Home/.dotfiles/exportrc
Normal file → Executable file
0
Misc/Home/.dotfiles/exportrc
Normal file → Executable file
0
Misc/Home/.dotfiles/functrc
Normal file → Executable file
0
Misc/Home/.dotfiles/functrc
Normal file → Executable file
0
Misc/Home/.tmux.conf
Normal file → Executable file
0
Misc/Home/.tmux.conf
Normal file → Executable file
0
RemoteInstall.sh
Normal file → Executable file
0
RemoteInstall.sh
Normal file → Executable file
0
Server/AptPackages.txt
Normal file → Executable file
0
Server/AptPackages.txt
Normal file → Executable file
@ -19,11 +19,12 @@ mkcd ./Root
|
||||
CpItem "etc/systemd/system/${f}.timer"
|
||||
done
|
||||
|
||||
CpSufx "Main/Server/VMs/*." sh
|
||||
|
||||
#CpSufx "Main/Server/VMs/*." sh
|
||||
for f in \
|
||||
WindowsServer2022 Windows7Earnapp1 \
|
||||
; do CpItem "etc/systemd/system/Vm${f}.service"
|
||||
WindowsServer2022 Windows7Earnapp1 Lubuntu2022NonProxied \
|
||||
; do
|
||||
CpItem "Main/Server/VMs/${f}.sh"
|
||||
CpItem "etc/systemd/system/Vm${f}.service"
|
||||
done
|
||||
|
||||
CpSufx "Main/Server/Scripts/*." sh mjs
|
||||
|
@ -6,6 +6,8 @@ let Time = new Date();
|
||||
Time.Stamp = `${Time.getFullYear()}-${(Time.getMonth() + 1).toString().padStart(2, '0')}-${Time.getDate().toString().padStart(2, '0')}`;
|
||||
cd(BackupsBase);
|
||||
|
||||
const GenericBrowserUserAgent = 'Mozilla/5.0 (X11; Linux x86_64; rv:120.0) Gecko/20100101 Firefox/120.0';
|
||||
|
||||
let [Jobs, Secrets] = [{}, {}];
|
||||
|
||||
// Import secrets from sh-formatted file
|
||||
@ -28,7 +30,12 @@ const ccencryptNow = async (File, BaseKey) => {
|
||||
$`echo ${Time.Stamp} > ${File}.info`;
|
||||
};
|
||||
|
||||
const GitPullPush = async () => await $`git pull; git add . && git commit -m "Auto-Backup ${Time}" && git push || true`;
|
||||
//const ExecAs = async (cmdline, user) => {
|
||||
// //return await $`${user ? ('sudo -u ' + user) : ''} sh -c '${cmdline}'`;
|
||||
//};
|
||||
|
||||
//const GitPullPush = async (user) => await ExecAs(`git pull; git add . && git commit -m "Auto-Backup ${Time}" && git push || true`, user);
|
||||
const GitPullPush = async () => await $`git pull; git add .; git commit -m "Auto-Backup ${Time}" || true; git push || true`;
|
||||
|
||||
const BackPathCrypt = async (Folder, Key, Ext) => {
|
||||
Ext ||= '.tar.xz';
|
||||
@ -40,12 +47,6 @@ const BackPathCrypt = async (Folder, Key, Ext) => {
|
||||
const SimpleCompress = async (Dst, Src) => await $`rm ${Dst}.tar.xz || true; tar cJSf "${Dst}.tar.xz" ${Src}`;
|
||||
|
||||
const SimpleBackup = async (Folder, Prefix) => {
|
||||
//await $`mkdir -vp "./${Folder}"`;
|
||||
//await $`rm "./${Folder}/Latest.tar.xz" || true`;
|
||||
//await $`rm -rf "./${Folder}/Latest.d" || true`;
|
||||
//await $`cp -rp "/Main/Server/${Prefix}/${Folder}" "./${Folder}/Latest.d"`;
|
||||
//await SimpleCompress(`./${Folder}/${Time.Stamp}`, `./${Folder}/Latest.d`);
|
||||
//await $`ln -s "./${Time.Stamp}.tar.xz" "./${Folder}/Latest.tar.xz"`;
|
||||
await $`mkdir -vp ./${Folder}`;
|
||||
await $`rm ./${Folder}/Latest.tar.xz || true`;
|
||||
await $`rm -rf ./${Folder}/Latest.d || true`;
|
||||
@ -78,7 +79,27 @@ Jobs.Local_SpaccBBS = async()=>{
|
||||
await $`ln -s "./Db.${Time.Stamp}.sql.tar.xz" ./SpaccBBS/Db.Latest.sql.tar.xz`;
|
||||
};
|
||||
|
||||
Jobs.Exter = async()=>{
|
||||
Jobs.Mixed_OctospaccAltervista = async()=>{
|
||||
const Domain = 'octospacc.altervista.org';
|
||||
cd(`./${Domain}-Git`);
|
||||
await $`rclone sync ${Domain}:/ ./www/wp-content/ --progress`;
|
||||
//await $`curl 'https://${Domain}/wp-admin/export.php?download=true&content=all&cat=0&post_author=0&post_start_date=0&post_end_date=0&post_status=0&page_author=0&page_start_date=0&page_end_date=0&page_status=0&attachment_start_date=0&attachment_end_date=0&submit=Scarica+il+file+di+esportazione' -H 'User-Agent: ${GenericBrowserUserAgent}' -H 'Referer: https://${Domain}/wp-admin/export.php' -H 'Connection: keep-alive' -H 'Cookie: ${Secrets.OctospaccAltervista_Backup_Cookie}' > ./WordPress.xml`;
|
||||
const args = [
|
||||
`https://${Domain}/wp-admin/export.php?download=true&content=all&cat=0&post_author=0&post_start_date=0&post_end_date=0&post_status=0&page_author=0&page_start_date=0&page_end_date=0&page_status=0&attachment_start_date=0&attachment_end_date=0&submit=Scarica+il+file+di+esportazione`,
|
||||
'-H', 'Connection: keep-alive',
|
||||
'-H', `User-Agent: ${GenericBrowserUserAgent}`,
|
||||
'-H', `Referer: https://${Domain}/wp-admin/export.php`,
|
||||
'-H', `Cookie: ${Secrets.OctospaccAltervista_Backup_Cookie}`,
|
||||
];
|
||||
await $`curl ${args} > ./WordPress.xml`;
|
||||
await GitPullPush();
|
||||
};
|
||||
|
||||
Jobs.Mixed_SpacccraftAltervista = async()=>{
|
||||
// ...
|
||||
};
|
||||
|
||||
Jobs.Exter_WikiSpacc = async()=>{
|
||||
// ...
|
||||
};
|
||||
|
||||
@ -124,19 +145,22 @@ Jobs.Cloud_SpaccCraft = async()=>{
|
||||
await GitPullPush();
|
||||
};
|
||||
|
||||
Jobs.Cloud_Private = async()=> await $`sudo -u tux rclone sync -v /Main/Clouds/octt GDrive-Uni-Crypt:/`;
|
||||
Jobs.Cloud_Private = async()=> await $`sudo -u tux rclone sync /Main/Clouds/octt GDrive-Uni-Crypt:/Clouds.octt --progress`;
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
await Work('Local_MiscSimpleBackups');
|
||||
await Work('Local_Shiori');
|
||||
await Work('Local_SpaccBBS');
|
||||
await Work('Exter');
|
||||
|
||||
await Work('Mixed_OctospaccAltervista');
|
||||
await Work('Mixed_SpacccraftAltervista');
|
||||
await Work('Exter_WikiSpacc');
|
||||
|
||||
await Work('Cloud_ServerBackupLimited');
|
||||
await Work('Cloud_ArticlesBackupPrivate');
|
||||
await Work('Cloud_SpaccBBS');
|
||||
await Work('Cloud_SpaccCraft');
|
||||
//await Work('Cloud_Private');
|
||||
await Work('Cloud_Private');
|
||||
|
||||
$`echo ${Time.Stamp} > ${BackupsBase}/Last.log`;
|
||||
|
@ -15,6 +15,7 @@ chown -R 1000:1000 /Main/Server/Desktop
|
||||
for Dir in \
|
||||
Backup/SpaccCraft \
|
||||
Server/TelegramIndex-Fork \
|
||||
Server/Bots/RSS-to-Telegram-Bot-Fork \
|
||||
; do chown -R 101000:101000 "/Main/${Dir}"
|
||||
done
|
||||
|
||||
|
@ -1,5 +1,11 @@
|
||||
#!/bin/sh
|
||||
|
||||
systemctl stop SocatIpProxies
|
||||
#certbot renew
|
||||
lxc-attach Debian2023 certbot renew
|
||||
certbot renew
|
||||
systemctl start SocatIpProxies
|
||||
|
||||
lxc-attach Debian2023 -- /bin/sh -c "
|
||||
systemctl stop nginx;
|
||||
certbot renew;
|
||||
systemctl start nginx;
|
||||
"
|
||||
|
@ -5,7 +5,7 @@ while true; do
|
||||
qemu-system-x86_64 \
|
||||
-accel kvm \
|
||||
-cpu host \
|
||||
-smp 2 \
|
||||
-smp 1 \
|
||||
-m 700M \
|
||||
-hda ./Lubuntu2022NonProxied.qcow2 \
|
||||
-device e1000,netdev=net0 \
|
||||
|
0
Server/Root/Main/Transfers/aria2/Conf/Server.conf
Normal file → Executable file
0
Server/Root/Main/Transfers/aria2/Conf/Server.conf
Normal file → Executable file
@ -28,7 +28,7 @@ T.m = T.getMinutes();
|
||||
T.is = (question) => {
|
||||
let allTrue = true;
|
||||
for (let predicate in question) {
|
||||
let word = predicate.replace('_', '');
|
||||
let word = predicate.replaceAll('_', '');
|
||||
let oracle = {
|
||||
//Y: T.Y,
|
||||
M: T.M,
|
||||
@ -52,10 +52,10 @@ T.is = (question) => {
|
||||
|
||||
///////////////////////////////////////
|
||||
|
||||
T.is({ h:'03', m_:'05' })
|
||||
T.is({ _D_:'2', h:'03', m_:'10' })
|
||||
&& Work('Backup', ()=>{ $`zx /Main/Server/Scripts/BackupAll.zx.mjs` });
|
||||
|
||||
T.is({ _D_:'9', h:'04', m_:'05' })
|
||||
T.is({ _D_:'9', h:'02', m_:'30' })
|
||||
&& Work('Certs', ()=>{ $`sh /Main/Server/Scripts/RenewCerts.sh` });
|
||||
|
||||
///////////////////////////////////////
|
||||
|
@ -1,21 +1,22 @@
|
||||
server {
|
||||
listen 443 ssl;
|
||||
server_name spacccloud.octt.eu.org;
|
||||
ssl_certificate /etc/letsencrypt/live/spacccloud.octt.eu.org/fullchain.pem;
|
||||
ssl_certificate_key /etc/letsencrypt/live/spacccloud.octt.eu.org/privkey.pem;
|
||||
ssl_prefer_server_ciphers on;
|
||||
location / {
|
||||
proxy_http_version 1.1;
|
||||
proxy_pass http://localhost:8560;
|
||||
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";
|
||||
}
|
||||
}
|
||||
#server {
|
||||
# listen 443 ssl;
|
||||
# server_name spacccloud.octt.eu.org;
|
||||
# ssl_certificate /etc/letsencrypt/live/spacccloud.octt.eu.org/fullchain.pem;
|
||||
# ssl_certificate_key /etc/letsencrypt/live/spacccloud.octt.eu.org/privkey.pem;
|
||||
# ssl_prefer_server_ciphers on;
|
||||
# location / {
|
||||
# proxy_http_version 1.1;
|
||||
# proxy_pass http://localhost:8560;
|
||||
# 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";
|
||||
# }
|
||||
#}
|
||||
|
||||
server {
|
||||
listen 80;
|
||||
listen 443 ssl;
|
||||
server_name spacccloud-wfm.octt.eu.org;
|
||||
ssl_certificate /etc/letsencrypt/live/spacccloud-wfm.octt.eu.org/fullchain.pem;
|
||||
|
@ -6,7 +6,7 @@ server {
|
||||
ssl_certificate_key /etc/letsencrypt/live/private-analytics-not-for-public-use.octt.eu.org/privkey.pem;
|
||||
ssl_prefer_server_ciphers on;
|
||||
location /sitoctt/ {
|
||||
resolver 10.0.3.1;
|
||||
resolver 9.9.9.9;
|
||||
proxy_http_version 1.1;
|
||||
proxy_pass https://sitoctt.goatcounter.com/;
|
||||
proxy_set_header Host "sitoctt.goatcounter.com";
|
||||
@ -17,7 +17,7 @@ server {
|
||||
proxy_set_header Connection "upgrade";
|
||||
}
|
||||
location /octtkb/ {
|
||||
resolver 10.0.3.1;
|
||||
resolver 9.9.9.9;
|
||||
proxy_http_version 1.1;
|
||||
proxy_pass https://octtkb.goatcounter.com/;
|
||||
proxy_set_header Host "octtkb.goatcounter.com";
|
||||
|
0
Server/Root/etc/nginx/sites-available/articles.wallabag.old
Normal file → Executable file
0
Server/Root/etc/nginx/sites-available/articles.wallabag.old
Normal file → Executable file
0
Server/Root/etc/nginx/sites-available/epic.octt.eu.org.conf.old
Normal file → Executable file
0
Server/Root/etc/nginx/sites-available/epic.octt.eu.org.conf.old
Normal file → Executable file
0
Server/Root/etc/nginx/sites-available/fediii.conf
Normal file → Executable file
0
Server/Root/etc/nginx/sites-available/fediii.conf
Normal file → Executable file
0
Server/Root/etc/nginx/sites-available/fren.conf
Normal file → Executable file
0
Server/Root/etc/nginx/sites-available/fren.conf
Normal file → Executable file
0
Server/Root/etc/nginx/sites-available/godo.octt.eu.org.conf.old
Normal file → Executable file
0
Server/Root/etc/nginx/sites-available/godo.octt.eu.org.conf.old
Normal file → Executable file
0
Server/Root/etc/nginx/sites-available/invidious.conf
Normal file → Executable file
0
Server/Root/etc/nginx/sites-available/invidious.conf
Normal file → Executable file
0
Server/Root/etc/nginx/sites-available/librex.conf
Normal file → Executable file
0
Server/Root/etc/nginx/sites-available/librex.conf
Normal file → Executable file
0
Server/Root/etc/nginx/sites-available/miss.octt.eu.org.conf.old
Normal file → Executable file
0
Server/Root/etc/nginx/sites-available/miss.octt.eu.org.conf.old
Normal file → Executable file
@ -117,12 +117,13 @@ server {
|
||||
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
|
||||
proxy_set_header X-Forwarded-Proto $scheme;
|
||||
proxy_set_header Upgrade $http_upgrade;
|
||||
sub_filter '<a href="/" id="title-a"' '<a style="position: absolute;" href="/Drive/">/Drive/</a><a style="margin-left: 3em;" href="/Drive/Telegram/" id="title-a"';
|
||||
sub_filter '<a href="/" id="title-a"' '<a style="/*position: absolute; margin-top: 0.25em;*/ word-break: keep-all;line-break: strict;" href="/Drive/">/Drive/</a><a style="/*margin-left: 3em;*/" href="/Drive/Telegram/" id="title-a"';
|
||||
sub_filter '<link href="/' '<link href="/Drive/Telegram/';
|
||||
sub_filter '<a href="/' '<a href="/Drive/Telegram/';
|
||||
sub_filter '<img src="/' '<img src="/Drive/Telegram/';
|
||||
sub_filter '<source src="/' '<source src="/Drive/Telegram/';
|
||||
sub_filter '<script src="/' '<script src="/Drive/Telegram/';
|
||||
sub_filter '<meta property="og:image" content="/' '<meta property="og:image" content="https://hlb0.octt.eu.org/Drive/Telegram/';
|
||||
sub_filter_once off;
|
||||
}
|
||||
|
||||
|
0
Server/Root/etc/nginx/sites-available/wordpress.conf
Normal file → Executable file
0
Server/Root/etc/nginx/sites-available/wordpress.conf
Normal file → Executable file
0
Server/Root/etc/systemd/system/CringeInoltro.service
Normal file → Executable file
0
Server/Root/etc/systemd/system/CringeInoltro.service
Normal file → Executable file
0
Server/Root/etc/systemd/system/FreshRSS-actualize.service
Normal file → Executable file
0
Server/Root/etc/systemd/system/FreshRSS-actualize.service
Normal file → Executable file
0
Server/Root/etc/systemd/system/FreshRSS-actualize.timer
Normal file → Executable file
0
Server/Root/etc/systemd/system/FreshRSS-actualize.timer
Normal file → Executable file
0
Server/Root/etc/systemd/system/OneShot.AfterBoot.service
Normal file → Executable file
0
Server/Root/etc/systemd/system/OneShot.AfterBoot.service
Normal file → Executable file
0
Server/Root/etc/systemd/system/Shiori.service
Normal file → Executable file
0
Server/Root/etc/systemd/system/Shiori.service
Normal file → Executable file
0
Server/Root/etc/systemd/system/ShioriFeed.service
Normal file → Executable file
0
Server/Root/etc/systemd/system/ShioriFeed.service
Normal file → Executable file
0
Server/Root/etc/systemd/system/TelegramIndex.service
Normal file → Executable file
0
Server/Root/etc/systemd/system/TelegramIndex.service
Normal file → Executable file
11
Server/Root/etc/systemd/system/VmLubuntu2022NonProxied.service
Executable file
11
Server/Root/etc/systemd/system/VmLubuntu2022NonProxied.service
Executable file
@ -0,0 +1,11 @@
|
||||
[Unit]
|
||||
Description=Lubuntu 2022 Non-Proxied VM
|
||||
After=network.target
|
||||
[Service]
|
||||
Type=simple
|
||||
Restart=always
|
||||
RestartSec=10
|
||||
User=root
|
||||
ExecStart=/bin/sh -c /Main/Server/VMs/Lubuntu2022NonProxied.sh
|
||||
[Install]
|
||||
WantedBy=multi-user.target
|
4
Server/Root/etc/systemd/system/WebFileManager.service
Normal file → Executable file
4
Server/Root/etc/systemd/system/WebFileManager.service
Normal file → Executable file
@ -5,8 +5,8 @@ After=network.target
|
||||
User=root
|
||||
Type=exec
|
||||
ExecStart=/usr/local/bin/filebrowser -a 0.0.0.0 -p 7580 -r /
|
||||
WorkingDirectory=/Server/SpaccCloud
|
||||
WorkingDirectory=/Main/Server/SpaccCloud
|
||||
Restart=always
|
||||
RestartSec=10
|
||||
RestartSec=15
|
||||
[Install]
|
||||
WantedBy=default.target
|
||||
|
0
Server/Root/etc/systemd/system/WinDog.service
Normal file → Executable file
0
Server/Root/etc/systemd/system/WinDog.service
Normal file → Executable file
0
Server/Root/etc/systemd/system/bittorrentd.service
Normal file → Executable file
0
Server/Root/etc/systemd/system/bittorrentd.service
Normal file → Executable file
0
Server/Root/etc/systemd/system/ncshell.service
Normal file → Executable file
0
Server/Root/etc/systemd/system/ncshell.service
Normal file → Executable file
0
Tests/Home/.Configs.Test
Normal file → Executable file
0
Tests/Home/.Configs.Test
Normal file → Executable file
0
Tests/Root/.Configs.Test
Normal file → Executable file
0
Tests/Root/.Configs.Test
Normal file → Executable file
0
Windows/Scripts/ArgMoveTaskbar.ahk
Normal file → Executable file
0
Windows/Scripts/ArgMoveTaskbar.ahk
Normal file → Executable file
0
Windows/Scripts/ArgSetTabletMode.ahk
Normal file → Executable file
0
Windows/Scripts/ArgSetTabletMode.ahk
Normal file → Executable file
0
Windows/Scripts/Earnapp via net_updater32.cmd
Normal file → Executable file
0
Windows/Scripts/Earnapp via net_updater32.cmd
Normal file → Executable file
0
Windows/Scripts/KeyToRightClick.ahk
Normal file → Executable file
0
Windows/Scripts/KeyToRightClick.ahk
Normal file → Executable file
0
Windows/Scripts/LeftToRightMouseClick.ahk
Normal file → Executable file
0
Windows/Scripts/LeftToRightMouseClick.ahk
Normal file → Executable file
0
Windows/Scripts/MoveTaskbar.ps1
Normal file → Executable file
0
Windows/Scripts/MoveTaskbar.ps1
Normal file → Executable file
0
Windows/Scripts/RemoteSessionDesktopTweaks.ahk
Normal file → Executable file
0
Windows/Scripts/RemoteSessionDesktopTweaks.ahk
Normal file → Executable file
0
Windows/Scripts/SpecialKeysITA.ahk
Normal file → Executable file
0
Windows/Scripts/SpecialKeysITA.ahk
Normal file → Executable file
0
Windows/Scripts/ToggleTabletMode.ahk
Normal file → Executable file
0
Windows/Scripts/ToggleTabletMode.ahk
Normal file → Executable file
Loading…
x
Reference in New Issue
Block a user