Synology tvheadend 로그인 오류

4.1.2140-1 최초설치

설치 직후 환경

vi /var/packages/tvheadend-testing/scripts/start-stop-status

#!/bin/sh

# Package
PACKAGE=”tvheadend-testing”
DNAME=”Tvheadend-testing”

# Others
INSTALL_DIR=”/usr/local/${PACKAGE}”
PATH=”${INSTALL_DIR}/bin:/usr/local/bin:/bin:/usr/bin:/usr/syno/bin”
USER=”tvheadend-testing”
GROUP=”users”
BINARY=”tvheadend”
TVHEADEND=”${INSTALL_DIR}/bin/${BINARY}”
PID_FILE=”${INSTALL_DIR}/var/tvheadend.pid”
LOG_FILE=”${INSTALL_DIR}/var/tvheadend.log”

if [ -e /usr/local/sundtek/opt/lib/libmediaclient.so ]; then
export LD_PRELOAD=/usr/local/sundtek/opt/lib/libmediaclient.so
fi

start_daemon ()
{
${TVHEADEND} -f -u ${USER} -g ${GROUP} -c ${INSTALL_DIR}/var -p ${PID_FILE}
}

sh-4.3# cat /etc/passwd | grep tvheadend
tvheadend-testing:x:1035:100:Tvheadend-Testing User:/var/services/homes/tvheadend-testing:/sbin/nologin

sh-4.3# id tvheadend-testing
uid=1035(tvheadend-testing) gid=100(users) groups=100(users)

sh-4.3# ps aux | grep tvheadend
tvheade+ 11950 0.3 0.6 1607840 12692 ? Ssl 02:45 0:00 /usr/local/tvheadend-testing/bin/tvheadend -f -u tvheadend-testing -g users -c /usr/local/tvheadend-testing/var -p /usr/local/tvheadend-testing/var/tvheadend.pid

sh-4.3# ls -aZl /var/packages/tvheadend-testing/target/
total 260
drwxr-xr-x 1 tvheadend-testing users ? 72 Jan 8 02:38 .
drwxrwxrwx 1 root root ? 308 Jan 8 02:38 ..
drwxr-xr-x 1 tvheadend-testing users ? 24 Jul 6 2016 app
drwxr-xr-x 1 tvheadend-testing users ? 338 Jan 8 02:38 bin
-rw-r–r– 1 tvheadend-testing users ? 250607 Jul 6 2016 cert.pem
drwxr-xr-x 1 tvheadend-testing users ? 2636 Jul 6 2016 lib
-rw-r–r– 1 tvheadend-testing users ? 10835 Jul 6 2016 openssl.cnf
drwxr-xr-x 1 tvheadend-testing users ? 18 Jul 6 2016 share
drwxr-xr-x 1 tvheadend-testing users ? 60 Jul 6 2016 var

sh-4.3# ls -aZl /var/packages/tvheadend-testing/target/var
total 4
drwxr-xr-x 1 tvheadend-testing users ? 60 Jul 6 2016 .
drwxr-xr-x 1 tvheadend-testing users ? 72 Jan 8 02:38 ..
drwxr-xr-x 1 tvheadend-testing users ? 64 Jan 8 02:38 accesscontrol
-rw-r–r– 1 tvheadend-testing users ? 550 Jul 6 2016 comskip.ini
drwxr-xr-x 1 tvheadend-testing users ? 64 Jan 8 02:38 passwd

(정상적으로 실행되고, 기초 설정을 완료한 상태)

sh-4.3# ls -aZl /var/packages/tvheadend-testing/target/var
total 20
drwxr-xr-x 1 tvheadend-testing users ? 158 Jan 8 02:45 .
drwxr-xr-x 1 tvheadend-testing users ? 72 Jan 8 02:38 ..
drwx—— 1 tvheadend-testing users ? 128 Jan 8 02:45 accesscontrol
drwx—— 1 tvheadend-testing users ? 832 Jan 8 02:44 bouquet
-rw-r–r– 1 tvheadend-testing users ? 550 Jul 6 2016 comskip.ini
-rw——- 1 tvheadend-testing users ? 942 Jan 8 02:45 config
drwx—— 1 tvheadend-testing users ? 12 Jan 8 02:44 dvr
-rw——- 1 tvheadend-testing users ? 138 Jan 8 02:45 epgdb.v2
-rw-r–r– 1 tvheadend-testing users ? 22 Jan 8 02:45 .lock
drwx—— 1 tvheadend-testing users ? 128 Jan 8 02:45 passwd
drwx—— 1 tvheadend-testing users ? 384 Jan 8 02:44 profile
-rw-r–r– 1 root root ? 6 Jan 8 02:45 tvheadend.pid

sh-4.3# ls -aZl /var/packages/tvheadend-testing/target/var/passwd/
total 4
drwxr-xr-x 1 tvheadend-testing users ? 64 Jan 8 02:38 .
drwxr-xr-x 1 tvheadend-testing users ? 60 Jul 6 2016 ..
-rwx—— 1 tvheadend-testing users ? 129 Jan 8 02:38 34126fd463ea05e47b08c666abc74a3f

종합

  • 설정파일에서의 사용자명/그룹명은 아래와 같음
    • 사용자명 : tvheadend-testing
    • 그룹명 : users
  • 최초설치 후 ‘cat /etc/passwd | grep tvheadend’로 위의 사용자가 생성된 것을 확인함
  • ‘id tvheadend-testing’으로 해당 사용자의 그룹명까지 일치함을 확인함.
  • ‘ps aux | grep tvheadend’로 실제 실행중인 프로세스가 tvheadend-testing 사용자 권한으로 실행중임을 확인.
  • ‘ls -aZl’로 ‘/var/packages/tvheadend-testing/target/’폴더 및 하위 폴더의 소유자/소유그룹 및 읽기 쓰기 권한(mod)이 대부분 위의 설정과 같이 되어있고, 소유자에게는 읽기/쓰기 권한은 설정되어있음. pid만 root 계정으로 생성됨.
  • 따라서, 최초 설치 이후 특별한 설정 없이 로그인에 아무 문제없고, 설정을 저장하는 것 또한 정상적으로 작동.

 

4.4.20171030-1로 업데이트

업데이트 직후 환경

# vi /var/packages/tvheadend-testing/scripts/start-stop-status

#!/bin/sh

# Package
PACKAGE=”tvheadend-testing”
DNAME=”Tvheadend-Testing”

# Others
INSTALL_DIR=”/usr/local/${PACKAGE}”
PATH=”${INSTALL_DIR}/bin:/usr/local/bin:/bin:/usr/bin:/usr/syno/bin”
BUILDNUMBER=”$(/bin/get_key_value /etc.defaults/VERSION buildnumber)”
TVHEADEND=”${INSTALL_DIR}/bin/tvheadend”
PID_FILE=”${INSTALL_DIR}/var/tvheadend-testing.pid”

SC_USER=”sc-tvheadend-testing”
LEGACY_USER=”tvheadend-testing”
USER=”$([ “${BUILDNUMBER}” -ge “7321” ] && echo -n ${SC_USER} || echo -n ${LEGACY_USER})”

if [ -e /usr/local/sundtek/opt/lib/libmediaclient.so ]; then
export LD_PRELOAD=/usr/local/sundtek/opt/lib/libmediaclient.so
fi

start_daemon ()
{
${TVHEADEND} -f -u ${USER} -c ${INSTALL_DIR}/var -p ${PID_FILE}
}

 

sh-4.3# cat /etc/passwd | grep tvheadend
sc-tvheadend:x:166568:166568::/var/packages/tvheadend-testing/target:/sbin/nologin

 

sh-4.3# id sc-tvheadend
uid=166568(sc-tvheadend) gid=166568(tvheadend-testing) groups=166568(tvheadend-testing)

 

sh-4.3# ps aux | grep tvheadend
system 20551 0.0 0.5 1151960 11632 ? Ssl 03:19 0:00 /usr/local/tvheadend-testing/bin/tvheadend -f -u sc-tvheadend-testing -c /usr/local/tvheadend-testing/var -p /usr/local/tvheadend-testing/var/tvheadend-testing.pid

 

sh-4.3# ls -aZl /var/packages/tvheadend-testing/target/
total 244
drwxr-xr-x 1 sc-tvheadend tvheadend-testing ? 86 Jan 8 03:19 .
drwxrwxrwx 1 root root ? 308 Jan 8 03:19 ..
drwxr-xr-x 1 sc-tvheadend tvheadend-testing ? 24 Nov 2 02:40 app
drwxr-xr-x 1 sc-tvheadend tvheadend-testing ? 684 Jan 8 03:19 bin
-rw-r–r– 1 sc-tvheadend tvheadend-testing ? 236061 Nov 2 01:50 cert.pem
drwxr-xr-x 1 sc-tvheadend tvheadend-testing ? 10 Nov 2 02:40 etc
drwxr-xr-x 1 sc-tvheadend tvheadend-testing ? 4874 Nov 2 02:40 lib
-rw-r–r– 1 sc-tvheadend tvheadend-testing ? 10835 Nov 2 01:47 openssl.cnf
drwxr-xr-x 1 sc-tvheadend tvheadend-testing ? 42 Nov 2 02:40 sbin
drwxr-xr-x 1 sc-tvheadend tvheadend-testing ? 56 Nov 2 02:40 share
drwxr-xr-x 1 1035 users ? 200 Jan 8 03:19 var

(업그레이드한 직후 실행중인 상태)

sh-4.3# ls -aZl /var/packages/tvheadend-testing/target/var
total 24
drwxr-xr-x 1 1035 users ? 200 Jan 8 03:19 .
drwxr-xr-x 1 sc-tvheadend tvheadend-testing ? 86 Jan 8 03:19 ..
drwx—— 1 1035 users ? 128 Jan 8 02:45 accesscontrol
drwx—— 1 1035 users ? 832 Jan 8 02:44 bouquet
-rw-r–r– 1 1035 users ? 550 Jul 6 2016 comskip.ini
-rw——- 1 1035 users ? 942 Jan 8 02:45 config
-rw-r–r– 1 root root ? 21 Jan 8 03:19 .dsm6_upgrade
drwx—— 1 1035 users ? 12 Jan 8 02:44 dvr
-rw——- 1 1035 users ? 138 Jan 8 03:18 epgdb.v2
-rw-r–r– 1 system system ? 22 Jan 8 03:19 .lock
drwx—— 1 1035 users ? 128 Jan 8 02:45 passwd
drwx—— 1 1035 users ? 384 Jan 8 02:44 profile
-rw-r–r– 1 root root ? 6 Jan 8 03:19 tvheadend-testing.pid

sh-4.3# ls -aZl /var/packages/tvheadend-testing/target/var/passwd/
total 8
drwx—— 1 1035 users ? 128 Jan 8 02:45 .
drwxr-xr-x 1 1035 users ? 200 Jan 8 03:19 ..
-rw——- 1 1035 users ? 129 Jan 8 02:45 b5e12cf383bc90f0e55e704e1e13772f
-rw——- 1 1035 users ? 113 Jan 8 02:45 eed879be8fdbbf5a11203d7fd82c692d

종합

  • 설정파일에서의 사용자명은 ‘sc-tvheadend-testing’이고, 그룹명은 명시되어있지 않음
  • 최초설치 후 ‘cat /etc/passwd | grep tvheadend’로 확인해보면 ‘sc-tvheadend’ 사용자가 생성되어있음을 확인할 수 있음.
  • ‘id sc-tvheadend’으로 조회해보면 그룹명은 ‘tvheadend-testing’으로 나옴.
  • 패키지 설치 폴더(/var/packages/tvheadend-testing/target/)에 ‘var’폴더를 제외하고는 소유자/소유그룹이 ‘sc-tvheadend/tvheadend-testing’으로 설정되어있음.
  • 패키지 설치 폴더안의 ‘var’폴더는 소유자가 변경되지않았고 이전 버전의 소유자(‘tvheadend-testing’)이 삭제되어 소유자가 숫자로 보임.
  • ‘ps aux | grep tvheadend’로 실제 실행중인 프로세스가 sc-tvheadend-testing 사용자로 실행되도록 설정되어있지만 그 계정이 존재하지 않기에 system 사용자 권한으로 실행중임.
  • 따라서 첫째, 설정파일에 적혀져있는 ‘sc-tvheadend-testing’ 계정이 실제로 존재하지 않아 system 계정 권한으로 실행됨. 둘째, 소유자가 불명하여(계정이 삭제되어 숫자로 표시됨) 접근 권한이 없는 var를 읽을 수 없어서 로그인 불가.

 

4.4.20171030-1 업데이트/설치 후 로그인 문제 해결방법

업데이트 후

  • 패키지 설치 폴더의 var 폴더의 소유자/소유그룹 수정
  • 설정파일의 SC_USER를 실제 존재하는 SC_USER로 수정

sh-4.3# chown sc-tvheadend:tvheadend-testing -R /var/packages/tvheadend-testing/target/var/

sh-4.3# vi /var/packages/tvheadend-testing/scripts/start-stop-status

#SC_USER=”sc-tvheadend-testing”
SC_USER=”sc-tvheadend”

(#되어있는 부분이 원래 있던 설정 내용)
위의 수정은 복사 붙여넣기보다는 직접 타이핑하여 수정하는 것을 추천 드립니다. 제가 테스트할 때 ” 쌍 따옴표와 ” 쌍 따옴표가 구분이 안되서 후자를 복사 붙여넣기 후 ‘왜 안되지’하고 찾아 헤맸습니다.

위 두 박스에 있는 내용을 적용 후 서비스를 재시작합니다.(패키지 센터에서 tvheadend-testing 선택 후 작업-중지 후 작업-시작

새로 설치 후

  • 설정파일의 SC_USER를 실제 존재하는 SC_USER로 수정

sh-4.3# vi /var/packages/tvheadend-testing/scripts/start-stop-status

#SC_USER=”sc-tvheadend-testing”
SC_USER=”sc-tvheadend”

(#되어있는 부분이 원래 있던 설정 내용)
위의 수정은 복사 붙여넣기보다는 직접 타이핑하여 수정하는 것을 추천 드립니다. 제가 테스트할 때 ” 쌍 따옴표와 ” 쌍 따옴표가 구분이 안되서 후자를 복사 붙여넣기 후 ‘왜 안되지’하고 찾아 헤맸습니다.

위 박스에 있는 내용을 적용 후 서비스를 재시작합니다.(패키지 센터에서 tvheadend-testing 선택 후 작업-중지 후 작업-시작

정상 작동 후 환경

sh-4.3# ls -aZl /var/packages/tvheadend-testing/target/var
total 24
drwxr-xr-x 1 sc-tvheadend tvheadend-testing ? 222 Jan 8 03:46 .
drwxr-xr-x 1 sc-tvheadend tvheadend-testing ? 86 Jan 8 03:19 ..
drwx—— 1 sc-tvheadend tvheadend-testing ? 128 Jan 8 03:45 accesscontrol
drwx—— 1 sc-tvheadend system ? 32 Jan 8 03:45 backup
drwx—— 1 sc-tvheadend tvheadend-testing ? 832 Jan 8 02:44 bouquet
drwx—— 1 sc-tvheadend system ? 256 Jan 8 03:45 codec
-rw-r–r– 1 sc-tvheadend tvheadend-testing ? 550 Jul 6 2016 comskip.ini
-rw——- 1 sc-tvheadend system ? 1358 Jan 8 03:45 config
-rw-r–r– 1 sc-tvheadend tvheadend-testing ? 21 Jan 8 03:19 .dsm6_upgrade
drwx—— 1 sc-tvheadend tvheadend-testing ? 12 Jan 8 02:44 dvr
-rw——- 1 sc-tvheadend system ? 138 Jan 8 03:46 epgdb.v2
-rw-r–r– 1 sc-tvheadend system ? 22 Jan 8 03:46 .lock
drwx—— 1 sc-tvheadend tvheadend-testing ? 128 Jan 8 03:46 passwd
drwx—— 1 sc-tvheadend tvheadend-testing ? 448 Jan 8 03:45 profile
-rw-r–r– 1 root root ? 6 Jan 8 03:46 tvheadend-testing.pid

(그룹이 system으로 바뀐건 비정상인거 같은데….작동은 하니…)

sh-4.3# ps aux | grep tvheadend
sc-tvhe+ 10872 0.0 0.5 1086424 12068 ? Ssl 03:46 0:00 /usr/local/tvheadend-testing/bin/tvheadend -f -u sc-tvheadend -c /usr/local/tvheadend-testing/var -p /usr/local/tvheadend-testing/var/tvheadend-testing.pid

 

4.4.20171030-1 > 4.4.20180117-1 업데이트 후

업데이트 직후 환경

vi /var/packages/tvheadend-testing/scripts/start-stop-status

#!/bin/sh

# Package
PACKAGE=”tvheadend-testing”
DNAME=”Tvheadend-Testing”

# Others
INSTALL_DIR=”/usr/local/${PACKAGE}”
PATH=”${INSTALL_DIR}/bin:/usr/local/bin:/bin:/usr/bin:/usr/syno/bin”
BUILDNUMBER=”$(/bin/get_key_value /etc.defaults/VERSION buildnumber)”
TVHEADEND=”${INSTALL_DIR}/bin/tvheadend”
PID_FILE=”${INSTALL_DIR}/var/tvheadend-testing.pid”

SC_USER=”sc-tvheadend-testing”
LEGACY_USER=”tvheadend-testing”
USER=”$([ “${BUILDNUMBER}” -ge “7321” ] && echo -n ${SC_USER} || echo -n ${LEGACY_USER})”

if [ -e /usr/local/sundtek/opt/lib/libmediaclient.so ]; then
export LD_PRELOAD=/usr/local/sundtek/opt/lib/libmediaclient.so
fi

start_daemon ()
{
${TVHEADEND} -f -u ${USER} -c ${INSTALL_DIR}/var -p ${PID_FILE}
}

sh-4.3# cat /etc/passwd | grep tvheadend
sc-tvheadend:x:166568:166568::/var/packages/tvheadend-testing/target:/sbin/nologin
sc-tvheadend-testing:x:166568:166568::/var/packages/tvheadend-testing/target:/sbin/nologin

sh-4.3# id sc-tvheadend-testing
uid=166568(sc-tvheadend) gid=166568(tvheadend-testing) groups=166568(tvheadend-testing)

sh-4.3# ps aux | grep tvheadend
sc-tvhe+ 12750 0.1 0.7 1696560 16160 ? Ssl 02:09 0:00 /usr/local/tvheadend-testing/bin/tvheadend -f -u sc-tvheadend-testing -c /usr/local/tvheadend-testing/var -p /usr/local/tvheadend-testing/var/tvheadend-testing.pid

sh-4.3# ls -aZl /var/packages/tvheadend-testing/target/
total 232
drwxr-xr-x 1 sc-tvheadend sc-media ? 86 Jan 21 02:09 .
drwxrwxrwx 1 root root ? 308 Jan 21 02:09 ..
drwxr-xr-x 1 sc-tvheadend sc-media ? 24 Jan 18 09:43 app
drwxr-xr-x 1 sc-tvheadend sc-media ? 676 Jan 21 02:09 bin
-rw-r–r– 1 sc-tvheadend sc-media ? 223903 Jan 18 08:48 cert.pem
drwxr-xr-x 1 sc-tvheadend sc-media ? 10 Jan 18 09:43 etc
drwxr-xr-x 1 sc-tvheadend sc-media ? 4798 Jan 18 09:43 lib
-rw-r–r– 1 sc-tvheadend sc-media ? 10835 Jan 18 08:45 openssl.cnf
drwxr-xr-x 1 sc-tvheadend sc-media ? 42 Jan 18 09:43 sbin
drwxr-xr-x 1 sc-tvheadend sc-media ? 56 Jan 18 09:43 share
drwxr-xr-x 1 sc-tvheadend root ? 238 Jan 21 02:11 var

sh-4.3# ls -aZl /var/packages/tvheadend-testing/target/var
total 24
drwxr-xr-x 1 sc-tvheadend root ? 238 Jan 21 02:11 .
drwxr-xr-x 1 sc-tvheadend sc-media ? 86 Jan 21 02:09 ..
drwxr-xr-x 1 sc-tvheadend root ? 64 Jan 21 02:06 accesscontrol
drwx—— 1 sc-tvheadend system ? 40 Jan 21 02:09 backup
drwx—— 1 sc-tvheadend system ? 832 Jan 21 02:06 bouquet
drwx—— 1 sc-tvheadend system ? 64 Jan 21 02:09 caclient
drwx—— 1 sc-tvheadend system ? 256 Jan 21 02:06 codec
-rw-r–r– 1 sc-tvheadend root ? 550 Nov 2 02:40 comskip.ini
-rw——- 1 sc-tvheadend system ? 1389 Jan 21 02:11 config
-rw-r–r– 1 root root ? 21 Jan 21 02:09 .dsm6_upgrade
drwx—— 1 sc-tvheadend system ? 12 Jan 21 02:06 dvr
-rw——- 1 sc-tvheadend system ? 138 Jan 21 02:09 epgdb.v2
-rw-r–r– 1 sc-tvheadend system ? 22 Jan 21 02:09 .lock
drwxr-xr-x 1 sc-tvheadend root ? 64 Jan 21 02:06 passwd
drwx—— 1 sc-tvheadend system ? 448 Jan 21 02:06 profile
-rw-r–r– 1 root root ? 6 Jan 21 02:09 tvheadend-testing.pid

sh-4.3# ls -aZl /var/packages/tvheadend-testing/target/var/passwd/
total 4
drwxr-xr-x 1 sc-tvheadend root ? 64 Jan 21 02:06 .
drwxr-xr-x 1 sc-tvheadend root ? 238 Jan 21 02:11 ..
-rwx—— 1 sc-tvheadend root ? 129 Jan 21 02:06 a927e30a755504f9784f23a4efac5109

 

4.4.20180117-1 업데이트/설치 후 로그인 문제

  • 없음!
  • 그런데 4.4.20171030-1, 4.4.20180117-1 두 버전 다 xmltv.sock 사용불가와 eth1 사용에 문제가 있음을 확인함. 현재 20170707 버전 사용중

 

 

참고

로그 확인하기

만약 tvheadend의 실행 중 어디가 오류가 났는지 보고싶으면, ‘ps aux | grep tvheadend’ 명령어로 tvheadend가 실행될 때의 명령어를 복사해두고 서비스를 종료한 후 복사해둔 명령어에서 -f 옵션만 제거하고 실행하면 된다. 그러면 모든 출력이 쉘에 그대로 뜰 것이다.

sh-4.3# /usr/local/tvheadend-testing/bin/tvheadend -h
/usr/local/tvheadend-testing/bin/tvheadend: /lib/libstdc++.so.6: no version information available (required by /usr/local/tvheadend-testing/lib/libx265.so.87)
/usr/local/tvheadend-testing/bin/tvheadend: /lib/libstdc++.so.6: no version information available (required by /usr/local/tvheadend-testing/lib/libx265.so.87)
Usage: /usr/local/tvheadend-testing/bin/tvheadend [OPTIONS]

Generic options

-h, –help Show this page
-v, –version Show version information

Service configuration

-c, –config Alternate configuration path
-B, –nobackup Don’t backup configuration tree at upgrade
-f, –fork Fork and run as daemon
-u, –user Run as user
-g, –group Run as group
-p, –pid Alternate PID path
-C, –firstrun If no user account exists then create one with
no username and no password. Use with care as
it will allow world-wide administrative access
to your Tvheadend installation until you create or edit
the access control from within the Tvheadend web interface.
-a, –adapters Only use specified DVB adapters (comma-separated, -1 = none)
–satip_bindaddr Specify bind address for SAT>IP server
–satip_rtsp SAT>IP RTSP port number for server
(default: -1 = disable, 0 = webconfig, standard port is 554)
–nosatip Disable SAT>IP client
–satip_xml URL with the SAT>IP server XML location

Server connectivity

-6, –ipv6 Listen on IPv6
-b, –bindaddr Specify bind address
–http_port Specify alternative http port
–http_root Specify alternative http webroot
–htsp_port Specify alternative htsp port
–htsp_port2 Specify extra htsp port
–useragent Specify User-Agent header for the http client
–xspf Use XSPF playlist instead of M3U

Debug options

-d, –stderr Enable debug on stderr
-n, –nostderr Disable debug on stderr
-s, –syslog Enable debug to syslog
-S, –nosyslog Disable syslog (all messages)
-l, –logfile Enable debug to file
–debug Enable debug subsystems
–trace Enable trace subsystems
–subsystems List subsystems
–fileline Add file and line numbers to debug
–threadid Add the thread ID to debug
–libav More verbose libav log
–uidebug Enable web UI debug (non-minified JS)
-A, –abort Immediately abort
-D, –dump Enable coredumps for daemon
–noacl Disable all access control checks
–nobat Disable DVB bouquets
-j, –join Subscribe to a service permanently

Testing options

–tsfile_tuners Number of tsfile tuners
–tsfile tsfile input (mux file)

For more information please visit the Tvheadend website:
https://tvheadend.org

 

로그인 후 아무것도 보이지 않을 때

ESXi를 synology reverse proxy로 접속하기 를 참고하여 프록시에서 웹소켓이 정상적으로 통신될 수 있도록 수정해야한다.

 

4.4.20180117-1 최초 설치 후

vi /var/packages/tvheadend-testing/scripts/start-stop-status

#!/bin/sh

# Package
PACKAGE=”tvheadend-testing”
DNAME=”Tvheadend-Testing”

# Others
INSTALL_DIR=”/usr/local/${PACKAGE}”
PATH=”${INSTALL_DIR}/bin:/usr/local/bin:/bin:/usr/bin:/usr/syno/bin”
BUILDNUMBER=”$(/bin/get_key_value /etc.defaults/VERSION buildnumber)”
TVHEADEND=”${INSTALL_DIR}/bin/tvheadend”
PID_FILE=”${INSTALL_DIR}/var/tvheadend-testing.pid”

SC_USER=”sc-tvheadend-testing”
LEGACY_USER=”tvheadend-testing”
USER=”$([ “${BUILDNUMBER}” -ge “7321” ] && echo -n ${SC_USER} || echo -n ${LEGACY_USER})”

if [ -e /usr/local/sundtek/opt/lib/libmediaclient.so ]; then
export LD_PRELOAD=/usr/local/sundtek/opt/lib/libmediaclient.so
fi

start_daemon ()
{
${TVHEADEND} -f -u ${USER} -c ${INSTALL_DIR}/var -p ${PID_FILE}
}

sh-4.3# cat /etc/passwd | grep tvheadend
sc-tvheadend-testing:x:166568:166568::/var/packages/tvheadend-testing/target:/sbin/nologin

sh-4.3# id sc-tvheadend-testing
uid=166568(sc-tvheadend-testing) gid=166568(tvheadend-testing) groups=166568(tvheadend-testing),65541(sc-media)

sh-4.3# ps aux | grep tvheadend
sc-tvhe+ 28329 7.5 0.6 686844 14024 ? Ssl 02:00 0:00 /usr/local/tvheadend-testing/bin/tvheadend -f -u sc-tvheadend-testing -c /usr/local/tvheadend-testing/var -p /usr/local/tvheadend-testing/var/tvheadend-testing.pid

sh-4.3# ls -aZl /var/packages/tvheadend-testing/target/
total 232
drwxr-xr-x 1 sc-tvheadend-testing sc-media ? 86 Jan 20 23:03 .
drwxrwxrwx 1 root root ? 308 Jan 20 23:03 ..
drwxr-xr-x 1 sc-tvheadend-testing sc-media ? 24 Jan 18 09:43 app
drwxr-xr-x 1 sc-tvheadend-testing sc-media ? 676 Jan 20 23:03 bin
-rw-r–r– 1 sc-tvheadend-testing sc-media ? 223903 Jan 18 08:48 cert.pem
drwxr-xr-x 1 sc-tvheadend-testing sc-media ? 10 Jan 18 09:43 etc
drwxr-xr-x 1 sc-tvheadend-testing sc-media ? 4798 Jan 18 09:43 lib
-rw-r–r– 1 sc-tvheadend-testing sc-media ? 10835 Jan 18 08:45 openssl.cnf
drwxr-xr-x 1 sc-tvheadend-testing sc-media ? 42 Jan 18 09:43 sbin
drwxr-xr-x 1 sc-tvheadend-testing sc-media ? 56 Jan 18 09:43 share
drwxr-xr-x 1 sc-tvheadend-testing sc-media ? 200 Jan 21 02:00 var

sh-4.3# ls -aZl /var/packages/tvheadend-testing/target/var
total 24
drwxr-xr-x 1 sc-tvheadend-testing sc-media ? 200 Jan 21 02:00 .
drwxr-xr-x 1 sc-tvheadend-testing sc-media ? 86 Jan 20 23:03 ..
drwxr-xr-x 1 sc-tvheadend-testing sc-media ? 64 Jan 20 23:03 accesscontrol
drwx—— 1 sc-tvheadend-testing system ? 832 Jan 20 23:03 bouquet
drwx—— 1 sc-tvheadend-testing system ? 64 Jan 20 23:03 caclient
drwx—— 1 sc-tvheadend-testing system ? 256 Jan 20 23:03 codec
-rw-r–r– 1 sc-tvheadend-testing sc-media ? 550 Jan 18 09:43 comskip.ini
-rw——- 1 sc-tvheadend-testing system ? 1438 Jan 21 01:58 config
drwx—— 1 sc-tvheadend-testing system ? 12 Jan 20 23:03 dvr
-rw——- 1 sc-tvheadend-testing system ? 122 Jan 21 01:59 epgdb.v2
-rw-r–r– 1 sc-tvheadend-testing system ? 22 Jan 21 02:00 .lock
drwxr-xr-x 1 sc-tvheadend-testing sc-media ? 64 Jan 20 23:03 passwd
drwx—— 1 sc-tvheadend-testing system ? 448 Jan 20 23:03 profile
-rw-r–r– 1 root root ? 6 Jan 21 02:00 tvheadend-testing.pid

sh-4.3# ls -aZl /var/packages/tvheadend-testing/target/var/passwd/
total 4
drwxr-xr-x 1 sc-tvheadend-testing sc-media ? 64 Jan 20 23:03 .
drwxr-xr-x 1 sc-tvheadend-testing sc-media ? 200 Jan 21 02:00 ..
-rwx—— 1 sc-tvheadend-testing sc-media ? 129 Jan 20 23:03 a927e30a755504f9784f23a4efac5109

 

 

 

 

 

댓글 남기기