Skip to content

Commit

Permalink
fixing shutdown bug on linux
Browse files Browse the repository at this point in the history
We have to call set_trigger(), else the paths to the binaries never gets set

 * #14 (comment)
  • Loading branch information
maltfield committed Jun 13, 2023
1 parent 1f4216a commit e8c83e0
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/packages/buskill/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -423,7 +423,7 @@ def __init__(self):
# set the default trigger to what's defined in the config file
self.config = configparser.ConfigParser()
self.config.read( self.CONF_FILE )
self.trigger = self.config.get('buskill', 'trigger')
self.set_trigger( self.config.get('buskill', 'trigger') )

# handle conditions where this version was already upgraded by a newer
# version or if this is a version that upgraded an older version
Expand Down Expand Up @@ -560,15 +560,15 @@ def set_trigger(self, trigger):

msg = "DEBUG: shutdown binary path:|" \
+str(self.trigger_softshutdown_lin_shutdown_path)+ "|"
print( msg ); logger.error( msg )
print( msg ); logger.debug( msg )

msg = "DEBUG: poweroff binary path:|" \
+str(self.trigger_softshutdown_lin_poweroff_path)+ "|"
print( msg ); logger.error( msg )
print( msg ); logger.debug( msg )

msg = "DEBUG: systemctl binary path:|" \
+str(self.trigger_softshutdown_lin_systemctl_path)+ "|"
print( msg ); logger.error( msg )
print( msg ); logger.debug( msg )

#elif self.OS_NAME_SHORT == 'win':
# n/a currently there's no checks needed for the soft-shutdown on windows
Expand Down

0 comments on commit e8c83e0

Please sign in to comment.