Skip to content

Fails to find youtube-dl when run from a startup script #95

@nuTTeLLo

Description

@nuTTeLLo

I am trying to get this to run as a service on a Synology NAS (DSM6) but am running into issues where it is not finding youtube-dl on the path even though it is specifically stated. Even when running youtube-dl within the script runs fine.

Here's my startup script podsync.sh (in /usr/local/etc/rc.d):

#!/bin/sh

start()
{
    echo "Using youtube-dl version `youtube-dl --version`"
    cd /volume1/Podsync
    /volume1/Podsync/podsync --config /volume1/Podsync/config.toml
}

stop()
{
    killall podsync
}

restart()
{
    stop
    start
}

case $1 in
    start)
        start
        ;;
    stop)
        stop
        ;;
    restart)
        stop
        start
        ;;
    *)
        echo $"Usage: $0 {start|stop|restart}"
        exit 1
esac

When running /usr/local/etc/rc.d/podsync.sh start I get this console output:

Using youtube-dl version 2020.01.01
INFO[2020-03-03T13:21:15+11:00]
 _______  _______  ______   _______           _        _______
(  ____ )(  ___  )(  __  \ (  ____ \|\     /|( (    /|(  ____ \
| (    )|| (   ) || (  \  )| (    \/( \   / )|  \  ( || (    \/
| (____)|| |   | || |   ) || (_____  \ (_) / |   \ | || |
|  _____)| |   | || |   | |(_____  )  \   /  | (\ \) || |
| (      | |   | || |   ) |      ) |   ) (   | | \   || |
| )      | (___) || (__/  )/\____) |   | |   | )  \  || (____/\
|/       (_______)(______/ \_______)   \_/   |/    )_)(_______/
INFO[2020-03-03T13:21:15+11:00] running podsync                               commit=9f4c926af1482fd1d22cc68275fee8b55548a775 date="2020-01-27T01:05:24Z" version=2.0.7
FATA[2020-03-03T13:21:15+11:00] youtube-dl error                              error="could not find youtube-dl: failed to execute youtube-dl: exec: \"youtube-dl\": executable file not found in $PATH"

We see that youtube-dl is pathed correctly from the first line, giving us back the version, but podsync itself fails to find it and errors out.

I am unable to use Docker on my NAS as it is not applicable. Running the Linux_i386 release version 2.0.7 of podsync.

Metadata

Metadata

Assignees

No one assigned

    Labels

    questionCategory: Questionwaiting-authorStatus: Waiting some action from the author

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions