Bug 256612 - multimedia/plexmediaserver: rc.d file uncleanly tries to kill nonexistent process
Summary: multimedia/plexmediaserver: rc.d file uncleanly tries to kill nonexistent pro...
Status: Closed Overcome By Events
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: --- Affects Some People
Assignee: Mark Felder
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2021-06-15 00:41 UTC by blue.esper
Modified: 2021-08-21 21:56 UTC (History)
0 users

See Also:
bugzilla: maintainer-feedback? (feld)


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description blue.esper 2021-06-15 00:41:53 UTC
the plex_stop_postcmd function in /usr/local/etc/rc.d/plexmediaserver attempts to kill any leftover child processes, but the kill command runs whether there are any or not. This makes it run without input if there are no processes to kill, making it return an error if you restart the plexmediaserver service. It's benign but unsightly, and I think it should be adjusted a bit to test if the variable is empty before trying to kill it. Something to the effect of:


        if [ -z ${_PLEX_CHILDREN} ];then
            kill -9 ${_PLEX_CHILDREN}
        fi