Well, adding:

Code:
--------------------
    
        warn `pwd`;
        warn `git -s --format=%h\\|%ci`;
  
--------------------


..yields what I suspected: the current working directory of the service
isn't the git directory.  When a process is started by systemd, the cwd
ends up being '/' unless the "WorkingDirectory=" directive is included
in the unit file.

If I change the git system call in Misc.pm to:


Code:
--------------------
    
        # if we're running from a git clone, report the last commit ID and 
timestamp
        if ( $revision eq 'TRUNK' && `git -C /usr/local/share/lms/server show 
-s --format=%h\\|%ci 2> /dev/null` =~ /^([0-9a-f]+)\|(\d{4}-\d\d-\d\d.*)/i ) {
                $revision = 'git-' . $1;
                $builddate = $2;
        }
  
--------------------


..then all is good and the webUI->Settings->Information page lists
"Logitech Media Server Version: 7.9.0 - git-99c17a4 @ 2016-04-28
23:40:50 +0200".

What's the proper LMS way to get the directory for slimserver.pl at
runtime?


------------------------------------------------------------------------
gharris999's Profile: http://forums.slimdevices.com/member.php?userid=115
View this thread: http://forums.slimdevices.com/showthread.php?t=105518

_______________________________________________
beta mailing list
[email protected]
http://lists.slimdevices.com/mailman/listinfo/beta

Reply via email to