mopidy-pummeluff/mopidy_pummeluff/actions/shutdown.py
Dominique Barton 0a2e63e6eb FEATURE: Add next & previous track actions
Also refactor the code to get rid of separate action functions & tag
classes. Now there's only action classes.

See also #13
2020-04-14 22:19:43 +02:00

31 lines
503 B
Python

'''
Python module for Mopidy Pummeluff shutdown tag.
'''
__all__ = (
'Shutdown',
)
from logging import getLogger
from os import system
from .base import Action
LOGGER = getLogger(__name__)
class Shutdown(Action):
'''
Shutting down the system.
'''
@classmethod
def execute(cls, core):
'''
Shutdown.
:param mopidy.core.Core core: The mopidy core instance
'''
LOGGER.info('Shutting down')
system('sudo /sbin/shutdown -h now')