mirror of
https://gitlab.com/octospacc/Configs.git
synced 2025-02-12 01:10:44 +01:00
Upd
This commit is contained in:
parent
3fc0869253
commit
d7c333ce04
@ -27,3 +27,8 @@ ccencryptNow() {
|
||||
WriteLastLog() {
|
||||
echo "$0: $(date)" > "${BackupsBase}/Last.log"
|
||||
}
|
||||
|
||||
EchoExec() {
|
||||
echo "$@"
|
||||
$@
|
||||
}
|
||||
|
@ -18,7 +18,7 @@ BackPathCrypt() {
|
||||
Folder="$1"
|
||||
Key="$2"
|
||||
Ext="$([ -z "$3" ] && echo ".tar.xz" || echo "$3")"
|
||||
cp "../${Folder}/Latest${Ext}" "./${Folder}${Ext}" && \
|
||||
cp -v "../${Folder}/Latest${Ext}" "./${Folder}${Ext}" && \
|
||||
ccencryptNow "./${Folder}${Ext}" "${Key}"
|
||||
}
|
||||
|
||||
@ -27,16 +27,12 @@ BackPathCrypt "Invidious-User" "${BackupKey_Git_Invidious}" ".7z"
|
||||
#BackPathCrypt "wallabag-data" "${BackupKey_Git_wallabag}"
|
||||
BackPathCrypt "FreshRSS-data" "${BackupKey_Git_FreshRSS}"
|
||||
#BackPathCrypt "shiori-data" "${BackupKey_Git_Shiori}"
|
||||
#Item="Invidious-User" && cp "../${Item}/Latest.7z" "./${Item}.7z" && ccencryptNow "./${Item}.7z" "${BackupKey_Git_Invidious}"
|
||||
#Item="wallabag-data" && cp "../${Item}/Latest.tar.xz" "./${Item}.tar.xz" && ccencryptNow "./${Item}.tar.xz" "${BackupKey_Git_wallabag}"
|
||||
#Item="FreshRSS-data" && cp "../${Item}/Latest.tar.xz" "./${Item}.tar.xz" && ccencryptNow "./${Item}.tar.xz" "${BackupKey_Git_FreshRSS}"
|
||||
#Item="shiori-data" && cp "../${Item}/Latest.tar.xz" "./${Item}.tar.xz" && ccencryptNow "./${Item}.tar.xz" "${BackupKey_Git_Shiori}"
|
||||
GitPush
|
||||
cd ..
|
||||
|
||||
cd ./Articles-Backup-Private
|
||||
rm -rf ./shiori-data
|
||||
cp -r "../shiori-data/Latest.d" "./shiori-data"
|
||||
EchoExec rm -rf ./shiori-data
|
||||
EchoExec cp -rp "../shiori-data/Latest.d" "./shiori-data"
|
||||
GitPush
|
||||
cd ..
|
||||
|
||||
|
@ -5,10 +5,10 @@
|
||||
|
||||
# Invidious personal JSON dump
|
||||
Name="Invidious-User"
|
||||
mkdir -p "./${Name}"
|
||||
mkdir -vp "./${Name}"
|
||||
curl \
|
||||
"${Invidious_Backup_URL}/subscription_manager?action_takeout=1&format=json" \
|
||||
-H "${Invidious_Backup_Cookie}" \
|
||||
| 7z a -mmt1 -mx9 "./${Name}/${RunDate}.7z" -si && cp "./${Name}/${RunDate}.7z" "./${Name}/Latest.7z"
|
||||
| 7z a -mmt1 -mx9 "./${Name}/${RunDate}.7z" -si && cp -v "./${Name}/${RunDate}.7z" "./${Name}/Latest.7z"
|
||||
|
||||
WriteLastLog
|
||||
|
@ -5,17 +5,21 @@
|
||||
|
||||
SimpleBackup() {
|
||||
# $1: Folder
|
||||
# $2: Optional prefix in /Server path
|
||||
mkdir -p "./$1"
|
||||
tar cvJSf "./$1/${RunDate}.tar.xz" "/Server/$2/$1" && \
|
||||
cp "./$1/${RunDate}.tar.xz" "./$1/Latest.tar.xz"
|
||||
rm -rf "./$1/Latest.d"
|
||||
cp -r "/Server/$2/$1" "./$1/Latest.d"
|
||||
# $2: Optional prefix relative to path in /Server
|
||||
mkdir -vp "./$1"
|
||||
#tar cvJSf "./$1/${RunDate}.tar.xz" "/Server/$2/$1" && \
|
||||
#cp "./$1/${RunDate}.tar.xz" "./$1/Latest.tar.xz"
|
||||
EchoExec rm -rf "./$1/Latest.d"
|
||||
EchoExec cp -rp "/Server/$2/$1" "./$1/Latest.d"
|
||||
EchoExec tar cJSf "./$1/${RunDate}.tar.xz" "./$1/Latest.d" && \
|
||||
cp -v "./$1/${RunDate}.tar.xz" "./$1/Latest.tar.xz"
|
||||
}
|
||||
|
||||
#SimpleBackup "wallabag-data"
|
||||
SimpleBackup "FreshRSS-data"
|
||||
|
||||
SimpleBackup "shiori-data" "Shiori"
|
||||
rm -v "./shiori-data/Latest.d/archive/*"
|
||||
|
||||
# GoToSocial
|
||||
#Name="GoToSocial"
|
||||
|
@ -21,7 +21,9 @@ ResetJobs() {
|
||||
echo "------------------------------------------"
|
||||
echo "[ $(date "+%F | %T") ] diycron started."
|
||||
|
||||
set -x # Enable command echo
|
||||
ResetJobs
|
||||
|
||||
while true
|
||||
do
|
||||
# Inside here, declaration of all cronjobs like normal shell commands, made easy thanks to integrated functions.
|
||||
|
34
Server/Root/etc/nginx/sites-available/SpaccCloud.conf
Normal file
34
Server/Root/etc/nginx/sites-available/SpaccCloud.conf
Normal file
@ -0,0 +1,34 @@
|
||||
#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:8080;
|
||||
# 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-wfm.octt.eu.org;
|
||||
ssl_certificate /etc/letsencrypt/live/spacccloud-wfm.octt.eu.org/fullchain.pem;
|
||||
ssl_certificate_key /etc/letsencrypt/live/spacccloud-wfm.octt.eu.org/privkey.pem;
|
||||
ssl_prefer_server_ciphers on;
|
||||
location / {
|
||||
proxy_http_version 1.1;
|
||||
proxy_pass http://localhost:7580;
|
||||
proxy_set_header Access-Control-Allow-Origin https://spacccloud.octt.eu.org http://192.168.1.25 http://192.168.1.25:8080;
|
||||
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";
|
||||
}
|
||||
}
|
@ -4,8 +4,17 @@ server {
|
||||
ssl_certificate /etc/letsencrypt/live/private-analytics-not-for-public-use.octt.eu.org/fullchain.pem;
|
||||
ssl_certificate_key /etc/letsencrypt/live/private-analytics-not-for-public-use.octt.eu.org/privkey.pem;
|
||||
ssl_prefer_server_ciphers on;
|
||||
location /sitoctt/ {
|
||||
proxy_http_version 1.1;
|
||||
proxy_pass https://sitoctt.goatcounter.com/;
|
||||
proxy_set_header Host "sitoctt.goatcounter.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";
|
||||
}
|
||||
location /octtkb/ {
|
||||
#resolver 9.9.9.9;
|
||||
proxy_http_version 1.1;
|
||||
proxy_pass https://octtkb.goatcounter.com/;
|
||||
proxy_set_header Host "octtkb.goatcounter.com";
|
||||
|
@ -6,7 +6,7 @@ server {
|
||||
ssl_prefer_server_ciphers on;
|
||||
location / {
|
||||
proxy_http_version 1.1;
|
||||
proxy_pass http://octt.ddns.net:8017;
|
||||
proxy_pass http://localhost:8017;
|
||||
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;
|
||||
|
20
Server/Root/etc/nginx/sites-available/invidious.conf
Normal file
20
Server/Root/etc/nginx/sites-available/invidious.conf
Normal file
@ -0,0 +1,20 @@
|
||||
server {
|
||||
listen 443 ssl;
|
||||
server_name 5e47578a-1136-4891-a526-7d5db74c1fbc.octt.eu.org;
|
||||
ssl_certificate /etc/letsencrypt/live/5e47578a-1136-4891-a526-7d5db74c1fbc.octt.eu.org/fullchain.pem;
|
||||
ssl_certificate_key /etc/letsencrypt/live/5e47578a-1136-4891-a526-7d5db74c1fbc.octt.eu.org/privkey.pem;
|
||||
ssl_prefer_server_ciphers on;
|
||||
location / {
|
||||
proxy_http_version 1.1;
|
||||
#proxy_pass https://invidious.snopyta.org/redirect?referer=;
|
||||
proxy_pass https://youtube.owacon.moe;
|
||||
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_hide_header Content-Security-Policy;
|
||||
proxy_hide_header X-Frame-Options;
|
||||
proxy_hide_header X-XSS-Protection;
|
||||
proxy_set_header Upgrade $http_upgrade;
|
||||
proxy_set_header Connection "upgrade";
|
||||
}
|
||||
}
|
@ -9,8 +9,12 @@ server {
|
||||
ssl_certificate /etc/letsencrypt/live/hlb0.octt.eu.org/fullchain.pem;
|
||||
ssl_certificate_key /etc/letsencrypt/live/hlb0.octt.eu.org/privkey.pem;
|
||||
ssl_prefer_server_ciphers on;
|
||||
error_page 404 = /404.html;
|
||||
location / {
|
||||
root /Server/www/root;
|
||||
try_files $uri =404;
|
||||
#try_files $uri =404;
|
||||
try_files $uri $uri.html $uri/index.html index.html;
|
||||
autoindex off;
|
||||
#error_page 404 = /404.html;
|
||||
}
|
||||
}
|
||||
|
@ -6,8 +6,8 @@ StartLimitIntervalSec=0
|
||||
Type=simple
|
||||
Restart=always
|
||||
RestartSec=5
|
||||
CPUQuota=80%
|
||||
MemoryMax=350M
|
||||
CPUQuota=85%
|
||||
MemoryMax=384M
|
||||
User=root
|
||||
ExecStart=sh -c "cat /var/log/diycron.log >> /var/log/diycron.log.old; sh /etc/diycron > /var/log/diycron.log"
|
||||
[Install]
|
||||
|
Loading…
x
Reference in New Issue
Block a user