kktuax / youtupi

YouTube (mobile) web frontend for your Raspberry Pi
https://maxtuni.es/2013/02/16/Introducing-YouTuPi.html
20 stars 6 forks source link

Error (and solution) while running "service youtupi start" #24

Closed leonardoalt closed 8 years ago

leonardoalt commented 8 years ago

Hello,

this error started happening to me after some upgrade on my Raspbian. If I'd run /etc/init.d/youtupi start it works fine, but not via service. This is the error:

-- Unit youtupi.service has begun starting up.
Apr 30 21:11:46 raspberrypi systemd[1846]: Failed at step EXEC spawning /etc/init.d/youtupi: Exec format error
-- Subject: Process /etc/init.d/youtupi could not be executed
-- Defined-By: systemd
-- Support: http://lists.freedesktop.org/mailman/listinfo/systemd-devel

I'm not sure if more people have experienced that or will, but I thought it would be important to give you the info. After some debugging I figured the problem was the line #! /bin/sh not being the first line of the file. No idea if it's a bug somewhere or if not placing it on the first line is really a mistake that *sh take care of, but I think it would be useful to update the file service/youtupi with this correction.

In any case, spot on, great work!

kktuax commented 8 years ago

I haven't experienced this problem with my raspian version by totally makes sense to have the #! /bin/sh at the beginning of the file.

The change is already pushed to the master branch, thank you for taking the time to debug the issue!