This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import octoprint.plugin | |
import subprocess | |
class MqttPrinterPowerPlugin(octoprint.plugin.StartupPlugin, | |
octoprint.plugin.SettingsPlugin): | |
def __init__(self): | |
self.mqtt_publish = lambda *args, **kwargs: None | |
self.mqtt_subscribe = lambda *args, **kwargs: None | |
self.mqtt_unsubscribe = lambda *args, **kwargs: None |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Setup: | |
# 1. Put ympd in /usr/local/sbin/ | |
# 2. Put the code in /etc/init.d/ympd | |
# 3. chown +x /etc/init.d/ympd | |
# 4. edit: /etc/default/ympd and add your arguments to ympd. | |
# Example: DAEMON_ARGS="--webport 80 --user mpd" | |
# 5. Run: update-rc.d ympd defaults | |
#! /bin/sh | |
### BEGIN INIT INFO |