기본 콘텐츠로 건너뛰기

라즈베리파이 Tvheadend EPG 자동 스케줄등록

1. shell 파일을 생성한다.
sudo nano /home/pi/shell/epg.sh

2. 아래 내용을 입력한다.
#!/bin/sh
sudo /usr/bin/python /home/pi/epg2xml-1.2.4/epg2xml.py -i KT -s /home/hts/.hts/tvheadend/epggrab/xmltv.sock

3. 실행권한을 추가한다.
sudo chmod +x epg.sh

4. 자동스케줄등록을 위하여 crontab을 연다.
crontab -e

5. 스케줄을 등록한다.
4 0 * * * /home/pi/shell/epg.sh

6. crontab을 재시작한다.
sudo /etc/init.d/cron restart

댓글

이 블로그의 인기 게시물

NodeJs 를 이용한 EPG 정보가져오기

* 나의 환경 정보 장비 : 라즈베리파이 3 b OS : 라즈비안 Jessie 사용 프로그램 : NodeJs v.8.11.3 방송사 : KT 올레TV 필요한 NODE 모듈은 아래와 같다. var cheerio = require ( 'cheerio' ),      request = require ( 'request' ),      iconv = require ( 'iconv-lite' ),      charset = require ( 'charset' ),      fs = require ( 'fs' ),      shell = require ( 'shelljs' ); * 순서 1. node로 웹크롤링을 해와서 방송 정보 xml파일을 만든다. 2. 만들어진 xml파일을 socat 을 이용하여 tvheadend xmltv.sock 로 전송해준다. * 소스 1. request 를 이용한 스크래핑 request . post ({          uri: epg2xml [ gISP ],          headers: { 'content-type' : 'application/x-www-form-urlencoded' },          body: require ( 'querystring' ). stringify ( postData ),          encoding: null        ...

413 (Request Entity Too Large)

• 파일업로드 오류시 nginx 업로드사이즈변경 1. 설정파일을 연다. sudo nano /etc/nginx/nginx.conf 2. http구문안에 아래내용을 삽입한다. http {   # Set client upload size - 100Mbyte   client_max_body_size 100M;   ...   ..   . } 3.업로드 크기가 설정되었으니 nginx를 재시작한다. nginx -s reload 또는 service nginx restart

ReactJs 웹 어플리케이션

먼저 npm 이 설치되어있어야한다. 1. npm install -g create-react-app => react 웹 어플리케이션 개발을 할 수있도록 페이스북에서 오픈한 create-react-app를 전역으로 설치한다. 2. create-react-app 앱이름 => "앱이름" 프로젝트를 생성한다