README
This commit is contained in:
@@ -216,14 +216,14 @@ edit the nextcloud config.php to use the https protocol
|
|||||||
nano /srv/nextcloud/config/config.php
|
nano /srv/nextcloud/config/config.php
|
||||||
```
|
```
|
||||||
|
|
||||||
```sh
|
|
||||||
We also use traefik and docker. I have added the following traefik label in our docker-compose.yml:
|
We also use traefik and docker. I have added the following traefik label in our docker-compose.yml:
|
||||||
|
|
||||||
```yml
|
```yml
|
||||||
- "traefik.http.middlewares.nc-header.headers.customRequestHeaders.X-Forwarded-Proto=https"
|
- "traefik.http.middlewares.nc-header.headers.customRequestHeaders.X-Forwarded-Proto=https"
|
||||||
```
|
```
|
||||||
|
|
||||||
|
```sh
|
||||||
And in the config.php, I’ve also added some values regarding reverse proxies:
|
And in the config.php, I’ve also added some values regarding reverse proxies:
|
||||||
|
|
||||||
'forwarded_for_headers' =>
|
'forwarded_for_headers' =>
|
||||||
@@ -268,15 +268,9 @@ volumes:
|
|||||||
NOTE: Just switch to syncthing
|
NOTE: Just switch to syncthing
|
||||||
|
|
||||||
```sh
|
```sh
|
||||||
#SYNC MOVIES FROM UNITY TO DISK 2
|
|
||||||
# CRON JOB
|
|
||||||
|
|
||||||
* * * * * /usr/bin/flock -n /tmp/classics.lockfile /home/$USER/home_server/scripts/sync_classics.sh
|
* * * * * /usr/bin/flock -n /tmp/classics.lockfile /home/$USER/home_server/scripts/sync_classics.sh
|
||||||
* * * * * /usr/bin/flock -n /tmp/flims.lockfile /home/$USER/home_server/scripts/sync_flims.sh
|
* * * * * /usr/bin/flock -n /tmp/flims.lockfile /home/$USER/home_server/scripts/sync_flims.sh
|
||||||
* * * * * /usr/bin/flock -n /tmp/tv.lockfile /home/$USER/home_server/scripts/sync_tv.sh
|
* * * * * /usr/bin/flock -n /tmp/tv.lockfile /home/$USER/home_server/scripts/sync_tv.sh
|
||||||
|
|
||||||
# movie_sync.sh CONTENT
|
|
||||||
|
|
||||||
```
|
```
|
||||||
|
|
||||||
|
|
||||||
@@ -307,11 +301,9 @@ echo "CRON TV FILE SYNC RAN AT: " `date '+%Y-%m-%d %H:%M:%S'` >> /home/null/logs
|
|||||||
|
|
||||||
*/25 * * * * /usr/bin/chmod -v 0777 -R /home/knast/shares/disk1/tv/* > /home/knast/logs/tv_chmod.log
|
*/25 * * * * /usr/bin/chmod -v 0777 -R /home/knast/shares/disk1/tv/* > /home/knast/logs/tv_chmod.log
|
||||||
|
|
||||||
|
```
|
||||||
|
|
||||||
```sh
|
```sh
|
||||||
|
|
||||||
# tv_sync.sh CONTENT
|
|
||||||
|
|
||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
echo "STARTING TV FILE SYNC RAN AT: " `date '+%Y-%m-%d %H:%M:%S'` >> /home/null/logs/tv_cron.log
|
echo "STARTING TV FILE SYNC RAN AT: " `date '+%Y-%m-%d %H:%M:%S'` >> /home/null/logs/tv_cron.log
|
||||||
/usr/bin/rsync -ravz --bwlimit=5000 --stats --progress --exclude='/home/null/shares/disk2/media/tv' -e "ssh -i /home/null/.ssh/id_rsa_sync " 'invalid@unity.whatbox.ca:/home/invalid/files/_tv' '/home/null/shares/disk2/media/tv' >> /home/null/logs/tv_cron.log
|
/usr/bin/rsync -ravz --bwlimit=5000 --stats --progress --exclude='/home/null/shares/disk2/media/tv' -e "ssh -i /home/null/.ssh/id_rsa_sync " 'invalid@unity.whatbox.ca:/home/invalid/files/_tv' '/home/null/shares/disk2/media/tv' >> /home/null/logs/tv_cron.log
|
||||||
|
|||||||
+16
-6
@@ -1,8 +1,18 @@
|
|||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
log_file=tv_cron.log
|
|
||||||
|
|
||||||
echo "STARTING TV FILE SYNC RAN AT: " `date '+%Y-%m-%d %H:%M:%S'` > /home/$USER/logs/$log_file ;
|
# THIS SCRIPT REQUIRES A KEY AND SSH CONFIG OF THE REMOTE HOST
|
||||||
/usr/bin/rsync -avz --no-perms --no-owner --no-group --stats --progress --exclude=/home/$USER/shares/disk1/tv -e "ssh -i /home/$USER/.ssh/id_rsa_what " invalid@mir.whatbox.ca:/home/invalid/files/_tv/ /home/$USER/shares/disk1/tv >> /home/$USER/logs/$log_file
|
|
||||||
echo "CRON TV FILE SYNC RAN AT: " `date '+%Y-%m-%d %H:%M:%S'` >> /home/$USER/logs/$log_file
|
SYNC_TYPE=TV
|
||||||
/usr/bin/chmod 777 -R /home/$USER/shares/disk1/tv > /home/$USER/logs/chmod_tv.log
|
|
||||||
echo "CRON CHMOD TV RAN AT: " `date '+%Y-%m-%d %H:%M:%S'` >> /home/$USER/logs/chmod_tv.log
|
LOG_FILE=tv_cron.log
|
||||||
|
LOG_CHMOD=chmod_tv.log
|
||||||
|
LOG_DIR=/home/$USER/logs
|
||||||
|
|
||||||
|
TARGET_ON_HOST=/home/$USER/shares/disk1/tv
|
||||||
|
TARGET_ON_REMOTE=/home/invalid/files/_tv/
|
||||||
|
|
||||||
|
echo "STARTING $SYNC_TYPE FILE SYNC RAN AT: " `date '+%Y-%m-%d %H:%M:%S'` > $LOG_DIR/$LOG_FILE ;
|
||||||
|
/usr/bin/rsync -avz --no-perms --no-owner --no-group --stats --progress --exclude=$TARGET_ON_HOST -e "ssh -i /home/$USER/.ssh/id_rsa_what " whatbox:$TARGET_ON_REMOTE $TARGET_ON_HOST >> $LOG_DIR/$LOG_FILE
|
||||||
|
echo "CRON $SYNC_TYPE FILE SYNC RAN AT: " `date '+%Y-%m-%d %H:%M:%S'` >> $LOG_DIR/$LOG_FILE
|
||||||
|
/usr/bin/chmod 777 -R $TARGET_ON_HOST > $LOG_DIR/$LOG_CHMOD
|
||||||
|
echo "CRON CHMOD $SYNC_TYPE RAN AT: " `date '+%Y-%m-%d %H:%M:%S'` >> $LOG_DIR/$LOG_CHMOD
|
||||||
Reference in New Issue
Block a user