Browse Source

Systemctl service update

master
Dirk Alders 2 years ago
parent
commit
eb24a3ee5d
2 changed files with 5 additions and 4 deletions
  1. 2
    1
      __install__.py
  2. 3
    3
      config_example/config.py

+ 2
- 1
__install__.py View File

6
 SERVICE_FILE = """
6
 SERVICE_FILE = """
7
 [Unit]
7
 [Unit]
8
 Description=Powerplug Service
8
 Description=Powerplug Service
9
-After=mosquitto.target
9
+After=network-online.target
10
+Wants=network-online.target
10
 [Service]
11
 [Service]
11
 User=%(UID)d
12
 User=%(UID)d
12
 Group=%(GID)d
13
 Group=%(GID)d

+ 3
- 3
config_example/config.py View File

6
 MQTT_USER = "user"
6
 MQTT_USER = "user"
7
 MQTT_PASS = "pass"
7
 MQTT_PASS = "pass"
8
 MQTT_SERVER = "localhost"
8
 MQTT_SERVER = "localhost"
9
-MQTT_TOPIC = "hifi/powerplug"
9
+MQTT_TOPIC = "dirk/powerplug"
10
 
10
 
11
 #
11
 #
12
 # Logging
12
 # Logging
13
 #
13
 #
14
 __BASEPATH__ = os.path.abspath(os.path.dirname(__file__))
14
 __BASEPATH__ = os.path.abspath(os.path.dirname(__file__))
15
 APP_NAME = "powerplug"
15
 APP_NAME = "powerplug"
16
-LOGTARGET = 'logfile'   # possible choices are: 'logfile' or 'stdout'
16
+LOGTARGET = 'stdout'   # possible choices are: 'logfile' or 'stdout'
17
 LOGLVL = 'DEBUG'
17
 LOGLVL = 'DEBUG'
18
 
18
 
19
 LOGHOST = 'cutelog'
19
 LOGHOST = 'cutelog'
20
 LOGPORT = 19996
20
 LOGPORT = 19996
21
 
21
 
22
-formatter = report.LONG_FMT
22
+formatter = report.SHORT_FMT

Loading…
Cancel
Save