clinton-hall / nzbToMedia

Provides NZB and Torrent postprocessing To CouchPotatoServer, SickBeard/SickRage, HeadPhones, Mylar and Gamez
GNU General Public License v3.0
672 stars 176 forks source link

Git path for DSM git package #459

Closed piejanssens closed 10 years ago

piejanssens commented 10 years ago

I see the following error in my logs which makes git update check and update not possible. I assume this is just a matter of setting the git binary path somewhere:

nzbToSickBeard: [09:11:51] [ERROR]::MAIN: Unable to determine installed version via git, please check your logs!

clinton-hall commented 10 years ago

I believe this happens if your scripts were not installed using git (i.e the source was included in an App and not installed via git clone) or when the .git folder was created by another user and therefore the downlaoder user can't access it.

So, if your downloader runs as user 'nzbget' or 'sabnzbd' etc, check to see what the owner and permissions are for ....nzbToMedia/.git folder. If it doesn't exist, you may want to do your own git clone (as the downloader user) to replace the existing version (just make a backup of your autoProcessMedia.cfg first and copy this back into the newly cloned repository

piejanssens commented 10 years ago

I did the clone using ssh with my admin user, but I gave the nzbToMedia folder 777 permission and I just checked and this is also true for the .git folder in there.

If I log in with SSH I cannot run command 'git'. I can only use it with the full path to the binary "/usr/local/git/bin/git". Maybe that's the issue?

clinton-hall commented 10 years ago

try setting autoProcessMedia.cfg

[General]
    git_path = /usr/local/git/bin/git
piejanssens commented 10 years ago

I set the git_path and reloaded nzbget, but I still see: nzbToSickBeard: [13:34:49] [ERROR]::MAIN: Unable to contact github, can't check for update

clinton-hall commented 10 years ago

wow. different error. this time it can't connect to github...

just to humour me cd into your ppscripts folder

chown -R nzbget:nzbget nzbToMedia

then try postprocessing again.

piejanssens commented 10 years ago
DiskStation> cd /volume1/downloads/nzbToMedia/
DiskStation> chown -R nzbget:nzbget nzbToMedia
chown: unknown user/group nzbget:nzbget

OK Now did it with group 'users' instead:

DiskStation> chown -R nzbget:users nzbToMedia
chown: nzbToMedia: No such file or directory
DiskStation> cd ..
DiskStation> chown -R nzbget:users nzbToMedia
clinton-hall commented 10 years ago

so what user does nzbget run as? ps aux | grep nzbget

piejanssens commented 10 years ago

Solved! nzbget is in group 'users'. This is the nzbget package from SynoCommunity, anything that can be done to that package to a. set the git path correctly and b. removes the need to chown the nzbToMedia folder manually?

nzbToSickBeard: [13:47:53] [INFO]::MAIN: No update needed
nzbToSickBeard: [13:47:52] [INFO]::MAIN: Checking if git needs an update
nzbToSickBeard: [13:47:52] [INFO]::MAIN: Checking database structure...

FYI nzbget is running as user nzbget.

piejanssens commented 10 years ago

That was a stupid question since nzbToMedia does not come with nzbget. Maybe this should be put in the wiki for Syno(community) nzbget users.

clinton-hall commented 10 years ago

yeah... my wiki is public... can you add this? Either start a new page or edit the appropriate one.

I can do it, but it will be second hand....

piejanssens commented 10 years ago

Yes no problem, happy to help. Will close this, but #457 is still open.