@
schumi2004
I don't think we should install DC from SynoCommunity. Before, it will require to install the python, but we don't need python
We do not need an extra load on the processor, right?
1. Go to your ubuntu VM.
2.
Code:
wget http://ftp.de.debian.org/debian/pool/main/d/debootstrap/debootstrap_1.0.67_all.deb
3.
Code:
sudo dpkg -i debootstrap_1.0.67_all.deb
4.
Code:
sudo debootstrap --foreign --arch armel wheezy debian "http://ftp.de.debian.org/debian"
(armel -- 88f628x; armhf --armada370, armadaxp; amd64 -- intel)
5.
Code:
sudo tar -czf debian.tar.gz debian
6. put this archive to /volume1 at DSM
7. go to DSM
8.
Code:
gzip -c -d debian.tar.gz | tar -xf -
9.
Code:
chroot debian /debootstrap/debootstrap --second-stage
10.
Code:
cp /etc/resolv.conf debian/etc/
11.
Code:
hostname > debian/etc/hostname
12.
Code:
mount -o bind /proc debian/proc
13. edit file /volume1/debian/etc/apt/sources.list
Code:
deb http://ftp.debian.org/debian/ wheezy main contrib non-free
deb http://mirror.yandex.ru/debian/ testing main contrib non-free
14. create file /usr/syno/etc.defaults/rc.d/S99debian.sh
for user aisman in debian
Code:
#!/bin/sh
grep -q /volume1/debian/proc /proc/mounts || mount -t proc proc /volume1/debian/proc
grep -q /volume1/debian/sys /proc/mounts || mount -t sysfs sys /volume1/debian/sys
grep -q /volume1/debian/dev /proc/mounts || mount -o bind /dev /volume1/debian/dev
grep -q /volume1/debian/dev/pts /proc/mounts || mount -o bind /dev/pts /volume1/debian/dev/pts
chroot /volume1/debian/ /root/runapps.sh &
mount -o bind /volume1/debian/home/aisman/Recordings /volume1/Recordings
chmod 777 -R /volume1/debian/home/aisman/Recordings
Code:
cmod +x /usr/syno/etc.defaults/rc.d/S99debian.sh
15. create file /volume1/debian/root/runapps.sh
Code:
#!/bin/bash
/etc/init.d/ssh start
sleep 40
/etc/init.d/tvheadend start
Code:
chmod +x /volume1/debian/root/runapps.sh
16.
Code:
chroot debian /bin/bash
if you want to install latest libs and gcc you have to install it with " -t testing" (apt get install -t testing blah-blah-blah)
for "stables" libs it should do it without this key:
17.
Code:
apt-get install sudo mc locales openssh-server xterm build-essential automake autopoint python ncurses-dev libssl-dev pkg-config zlib1g-dev gettext git curl libgc-dev libcurl4-openssl-dev -y
to creating user aisman: (you may create user hts)
18.
set password
19. you are in debian, create file /etc/default/tvheadend, note: if you user isn't "hts" change TVH_USER="hts"
Code:
#
# Default configuration for tvheadend
#
# TVH_ENABLED
# set to 0 to disable upstart job
TVH_ENABLED=1
# TVH_USER
# if set to "" will run as root
TVH_USER="hts"
# TVH_GROUP
# if set to "" will run as root
TVH_GROUP="video"
# TVH_CONF_DIR
# if set to "" will use ~TVH_USER/.hts/tvheadend
TVH_CONF_DIR=""
# TVH_ADAPTERS
# if set to "" will use all available adapters
# for select adapters use comma seperated list of adapter
# numbers, i.e. to use /dev/dvb/adapter0 and /dev/dvb/adapter1 only
# set as "0,1"
TVH_ADAPTERS=""
# TVH_IPV6
# if set to 1 will enable IPv6 support
TVH_IPV6=0
# TVH_HTTP_PORT
# if set to "" will use binary default
TVH_HTTP_PORT=""
# TVH_HTTP_ROOT
# if set to "" will use binary default
# else will change the webui root context, useful for proxied
# servers
TVH_HTTP_ROOT=""
# TVH_HTSP_PORT
# if set to "" will use binary default
TVH_HTSP_PORT=""
# TVH_DEBUG
# if set to 1 will output debug to syslog
TVH_DEBUG=0
# TVH_ARGS
# add any other arguments
TVH_ARGS=""
20. you are still in debian, create file /etc/init.d/tvheadend
Code:
#! /bin/sh
### BEGIN INIT INFO
# Provides: tvheadend
# Required-Start: $local_fs $remote_fs udev
# Required-Stop: $local_fs $remote_fs
# Default-Start: 2 3 4 5
# Default-Stop: 0 1 6
### END INIT INFO
# Author: Andreas Öman
# Do NOT "set -e"
# PATH should only include /usr/* if it runs after the mountnfs.sh script
PATH=/usr/sbin:/usr/bin:/sbin:/bin
DESC="Tvheadend"
NAME=tvheadend
DAEMON=/usr/bin/$NAME
PIDFILE=/var/run/$NAME.pid
SCRIPTNAME=/etc/init.d/$NAME
# Exit if the package is not installed
[ -x "$DAEMON" ] || exit 0
# Read configuration variable file if it is present
[ -r /etc/default/$NAME ] && . /etc/default/$NAME
# Configure command line options
[ "$TVH_ENABLED" = "1" ] || exit 0
ARGS="-f"
[ -z "$TVH_USER" ] || ARGS="$ARGS -u $TVH_USER"
[ -z "$TVH_GROUP" ] || ARGS="$ARGS -g $TVH_GROUP"
[ -z "$TVH_CONF_DIR" ] || ARGS="$ARGS -c $TVH_CONF_DIR"
[ -z "$TVH_ADAPTERS" ] || ARGS="$ARGS -a $TVH_ADAPTERS"
[ "$TVH_IPV6" = "1" ] && ARGS="$ARGS -6"
[ -z "$TVH_HTTP_PORT" ] || ARGS="$ARGS --http_port $TVH_HTTP_PORT"
[ -z "$TVH_HTTP_ROOT" ] || ARGS="$ARGS --http_root $TVH_HTTP_ROOT"
[ -z "$TVH_HTSP_PORT" ] || ARGS="$ARGS --htsp_port $TVH_HTSP_PORT"
[ -z "$TVH_ARGS" ] || ARGS="$ARGS $TVH_ARGS"
[ "$TVH_DEBUG" = "1" ] && ARGS="$ARGS -s"
# Load the VERBOSE setting and other rcS variables
[ -f /etc/default/rcS ] && . /etc/default/rcS
# Define LSB log_* functions.
# Depend on lsb-base (>= 3.0-6) to ensure that this file is present.
. /lib/lsb/init-functions
#
# Function that starts the daemon/service
#
do_start()
do_start()
{
# Return
# 0 if daemon has been started
# 1 if daemon was already running
# 2 if daemon could not be started
udevadm settle
start-stop-daemon --start --quiet --pidfile $PIDFILE --exec $DAEMON --te
|| return 1
start-stop-daemon --start --quiet --pidfile $PIDFILE --exec $DAEMON -- \
$ARGS \
|| return 2
}
#
# Function that stops the daemon/service
#
do_stop()
{
# Return
# 0 if daemon has been stopped
# 1 if daemon was already stopped
# 2 if daemon could not be stopped
# other if a failure occurred
start-stop-daemon --stop --quiet --retry=TERM/30/KILL/5 --pidfile $PIDFI
RETVAL="$?"
[ "$RETVAL" = 2 ] && return 2
# Many daemons don't delete their pidfiles when they exit.
rm -f $PIDFILE
return "$RETVAL"
}
case "$1" in
start)
[ "$VERBOSE" != no ] && log_daemon_msg "Starting $DESC" "$NAME"
do_start
case "$?" in
0|1) [ "$VERBOSE" != no ] && log_end_msg 0 ;;
2) [ "$VERBOSE" != no ] && log_end_msg 1 ;;
esac
;;
stop)
[ "$VERBOSE" != no ] && log_daemon_msg "Stopping $DESC" "$NAME"
do_stop
case "$?" in
0|1) [ "$VERBOSE" != no ] && log_end_msg 0 ;;
2) [ "$VERBOSE" != no ] && log_end_msg 1 ;;
esac
;;
restart|force-reload)
#
# If the "reload" option is implemented then remove the
# 'force-reload' alias
#
log_daemon_msg "Restarting $DESC" "$NAME"
do_stop
case "$?" in
0|1)
do_start
case "$?" in
0) log_end_msg 0 ;;
1) log_end_msg 1 ;; # Old process is still running
*) log_end_msg 1 ;; # Failed to start
esac
;;
*)
# Failed to stop
log_end_msg 1
;;
esac
;;
*)
echo "Usage: $SCRIPTNAME {start|stop|restart|force-reload}" >&2
exit 3
;;
esac
21. to going via ssh change port 22 to 2222 in openssh-server at file /etc/ssh/sshd_config
22. reboot NAS
23. go via ssh and login into your user (you vill be at you /home/your-user folder) and do
Code:
git clone https://github.com/tvheadend/tvheadend
Code:
./configure --prefix=/usr --disable-avahi
important: do
set access
create folder to recordings (see s99debian.sh) and set it in tvh-GUI
reboot