Twonky 8.5.1 / Debian 10 - how to enable autostart.

Linux and UNIX specific discussions
Post Reply
synoptic
Posts:3
Joined:Wed Feb 26, 2020 10:27 am
AV Hardware:Debian 10
Intel(R) Xeon(R) CPU E3-1240L v5 @ 2.10GHz
Twonky 8.5.1 / Debian 10 - how to enable autostart.

Post by synoptic » Wed Feb 26, 2020 10:44 am

Please, help me enable twonkyserver to autostart on Linux Debian 10.
With included documents it is not clear how to make autostart.

Thanks in advance to everyone.

synoptic
Posts:3
Joined:Wed Feb 26, 2020 10:27 am
AV Hardware:Debian 10
Intel(R) Xeon(R) CPU E3-1240L v5 @ 2.10GHz

Re: Twonky 8.5.1 / Debian 10 - how to enable autostart.

Post by synoptic » Fri Feb 28, 2020 9:49 am

Can someone give some advice?
I can start Twonky by hand, but cannot start it as service.

By Hand, it starts, but with a warning:
--------------------------------------------------------------------------
user@server:/usr/local/twonky# ./twonky.sh start
Starting /usr/local/twonky/twonkystarter ...
user@server:/usr/local/twonky#
For image conversion and scaling the TwonkyServer utilizes ImageMagick. For details on the license please see /usr/local/twonky/cgi-bin/convert-readme.txt
Twonky Version 8.5.1
Snapshot Twonky_8.5.1_20180521 TA:c5bd20adecfd43fcf30c90b1271d424f773c1060
Platform x86-64_gcc520_glibc222_2__twonkyforum-x86-64-glibc-2.22
No TLS-server certificate found in tls_server.pem! Will use built-in keys (this is insecure)! You have been warned ...----------------------------------------------------------------------------------------------------------------------
Why it ask for TLS-sertificate? I don't need that. It simple local home server in my appartment.
Ok, how can fix that? Where can I find instructions how to create this TLS-sertificate at my own. Is there any docs?

Next.
I've tried to make service: /usr/lib/systemd/system/twonky.service
------------------------------------------------------------------------------------
[Unit]
Description=Twonky Service

[Service]
Type=forking
ExecStart=/usr/local/twonky/twonky.sh start
ExecStop=/usr/local/twonky/twonky.sh stop
ExecReload=/usr/local/twonky/twonky.sh restart
User=... # obscured, here is a correct non root user that has access to folders: video, music, picture

[Install]
WantedBy=multi-user.target
------------------------------------------------------------------------------------
Pretty simple.

When I start it:
# systemctl start twonky

● twonky.service - Twonky Service
Loaded: loaded (/lib/systemd/system/twonky.service; disabled; vendor preset: enabled)
Active: failed (Result: exit-code) since Fri 2020-02-28 13:03:13 +05; 4min 58s ago
Process: 10187 ExecStart=/usr/local/twonky/twonky.sh start (code=exited, status=13)

фев 28 13:03:11 vxlab.ru systemd[1]: Starting Twonky Service...
фев 28 13:03:11 vxlab.ru systemd[1]: twonky.service: Control process exited, code=exited, status=13/n/a
фев 28 13:03:13 vxlab.ru systemd[1]: twonky.service: Failed with result 'exit-code'.
фев 28 13:03:13 vxlab.ru systemd[1]: Failed to start Twonky Service.


What is wrong? Why "status=13"?

Thanks in advance.

waw555
Posts:1
Joined:Tue Mar 31, 2020 4:39 pm
AV Hardware:Debian

Re: Twonky 8.5.1 / Debian 10 - how to enable autostart.

Post by waw555 » Tue Mar 31, 2020 5:59 pm

Hello!

Use

Code: Select all

[Unit]
Description=Twonky service
After=syslog.target network.target

[Service]
Type=forking
ExecStart=/usr/local/twonky/twonkystarter
ExecStop=/usr/local/twonky/twonky.sh stop
PIDFile=/var/run/mediaserver.pid

[Install]
WantedBy=multi-user.target
See: https://bbs.archlinux.org/viewtopic.php?id=151251

synoptic
Posts:3
Joined:Wed Feb 26, 2020 10:27 am
AV Hardware:Debian 10
Intel(R) Xeon(R) CPU E3-1240L v5 @ 2.10GHz

Re: Twonky 8.5.1 / Debian 10 - how to enable autostart.

Post by synoptic » Thu Apr 16, 2020 9:02 am

@waw555
Thank you very much!
That was really good advice. Everything is work now.

Post Reply