해피 투게더

omv5 하드 확장(2TB>4TB) 본문

장난감

omv5 하드 확장(2TB>4TB)

보아요 2020. 9. 26. 14:28

8테라가 사고 싶었지만... 2테라 백업받는데 3시간 넘게 걸리는...

 

transmission, nginx and webdav

version: "2.1"
services:
  transmission:
    image: linuxserver/transmission
    container_name: transmission
    environment:
      - PUID=1000
      - PGID=100
      - TZ=Europe/London
      - TRANSMISSION_WEB_HOME=/combustion-release/ #optional
      - USER=dad #optional
      - PASS=admin #optional
    volumes:
      - /srv/dev-disk-by-id-ata-WDC_WD20EFRX-68EUZN0_WD-WCC4M5NLPC0L-part2/hd1/docker/transmission:/config
      - /srv/dev-disk-by-id-ata-WDC_WD20EFRX-68EUZN0_WD-WCC4M5NLPC0L-part2/hd1/torrent:/downloads
      - /srv/dev-disk-by-id-ata-TOSHIBA_MD04ABA400V_85V9K3SZFMYB-part2/hd2:/sharedfolders/public
      - /srv/dev-disk-by-id-ata-TOSHIBA_MD04ABA400V_85V9K3SZFMYB-part2/hd2/watch:/watch
    ports:
      - 9091:9091
      - 51413:51413
      - 51413:51413/udp
    restart: unless-stopped
    
  webdav:
    image: joajoa/nginx-php-fpm-webdav:armhf
    container_name: webtt
    volumes:
      - /srv/dev-disk-by-id-ata-TOSHIBA_MD04ABA400V_85V9K3SZFMYB-part2/hd2:/var/www/hm
      - /srv/dev-disk-by-id-ata-TOSHIBA_MD04ABA400V_85V9K3SZFMYB-part2/hd2/Media:/var/www/webhm
      - /srv/dev-disk-by-id-ata-WDC_WD20EFRX-68EUZN0_WD-WCC4M5NLPC0L-part2/hd1/docker/nginx/conf.d:/etc/nginx/conf.d
    ports:
      - 2222:80
      - 2060:2060
      - 2080:2080
    restart: unless-stopped

traffic

version: "2"
services:
  traefik:
    image: traefik:latest
    container_name: traefik
    volumes:
      - /srv/dev-disk-by-id-ata-WDC_WD20EFRX-68EUZN0_WD-WCC4M5NLPC0L-part2/hd1/docker/traefik2/traefik.yml:/etc/traefik/traefik.yml
      - /srv/dev-disk-by-id-ata-WDC_WD20EFRX-68EUZN0_WD-WCC4M5NLPC0L-part2/hd1/docker/traefik2/config:/config
      - /srv/dev-disk-by-id-ata-WDC_WD20EFRX-68EUZN0_WD-WCC4M5NLPC0L-part2/hd1/docker/traefik2/config/acme.json:/acme.json
      - /srv/dev-disk-by-id-ata-WDC_WD20EFRX-68EUZN0_WD-WCC4M5NLPC0L-part2/hd1/docker/traefik2/log:/log
      - /var/run/docker.sock:/var/run/docker.sock # traefik이 docker event를 listen하게 합니다.
    ports:
      - 8880:80
      - 8443:443
      - 8080:8080
    restart: unless-stopped

 

EBS 녹음

crontab -e

 

0 5 * * 1-6 /root/ebs_record.sh Pocket-CH 10 /srv/dev-disk-by-id-ata-TOSHIBA_MD04ABA400V_85V9K3SZFMYB-part2/hd2/EBS/1Pocket-CH
30 5 * * 4-6 /root/ebs_record.sh Basic-CH 20 /srv/dev-disk-by-id-ata-TOSHIBA_MD04ABA400V_85V9K3SZFMYB-part2/hd2/EBS/2Basic-CH
20 6 * * 1-6 /root/ebs_record.sh Easywriting 20 /srv/dev-disk-by-id-ata-TOSHIBA_MD04ABA400V_85V9K3SZFMYB-part2/hd2/EBS/3Easywriting

0 7 * * 1-6 /root/ebs_record.sh SpeakEng 20 /srv/dev-disk-by-id-ata-TOSHIBA_MD04ABA400V_85V9K3SZFMYB-part2/hd2/EBS/4SpeakEng
40 7 * * 1-6 /root/ebs_record.sh PowerEng 20 /srv/dev-disk-by-id-ata-TOSHIBA_MD04ABA400V_85V9K3SZFMYB-part2/hd2/EBS/5PowerEng

 

ebs_record.sh 스크립트

#!/bin/bash

RADIO_ADDR="rtmp://ebsandroid.ebs.co.kr:1935/fmradiofamilypc/familypc1m"

RADIO_NAME="ebs_radio"


PROGRAM_NAME=$1

RECORD_MINS=$(($2 * 60))

DEST_DIR=$3


REC_DATE=`date +%Y%m%d-%H%M`

TEMP_FLV=/srv/dev-disk-by-id-ata-TOSHIBA_MD04ABA400V_85V9K3SZFMYB-part2/hd2/EBS/`date +%Y%m%d-%H%M`


M4A_FILE_NAME=$PROGRAM_NAME"_"$REC_DATE.m4a


rtmpdump -r $RADIO_ADDR -B $RECORD_MINS -o $TEMP_FLV

ffmpeg -i $TEMP_FLV -vn -acodec copy $M4A_FILE_NAME > /dev/null 2>&1


rm $TEMP_FLV


mkdir -p $DEST_DIR

mv $M4A_FILE_NAME $DEST_DIR

 

아래처럼 1분간 테스트 해보니 잘되는 듯.

 

 /root/ebs_record.sh test 1 /srv/dev-disk-by-id-ata-TOSHIBA_MD04ABA400V_85V9K3SZFMYB-part2/hd2/EBS