Skip to content

Commit

Permalink
Update main.js
Browse files Browse the repository at this point in the history
  • Loading branch information
uilton-oliveira committed Jan 9, 2022
1 parent 6a154bc commit 552cc27
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/main.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,8 @@ const {
WOL_BROADCAST_ADDR,
MQ_HOST,
MQ_USER,
MQ_PASS
MQ_PASS,
MQ_CLIENT_ID,
} = process.env;

if (!WOL_HOST || !WOL_USER || !WOL_PASS || !WOL_MAC || !WOL_BROADCAST_ADDR || !MQ_HOST || !MQ_USER || !MQ_PASS) {
Expand All @@ -20,7 +21,7 @@ if (!WOL_HOST || !WOL_USER || !WOL_PASS || !WOL_MAC || !WOL_BROADCAST_ADDR || !M
}

const client = mqtt.connect(`mqtt://${MQ_HOST}`, {
clientId: "mqtt_wol",
clientId: MQ_CLIENT_ID || "mqtt_wol",
username: MQ_USER,
password: MQ_PASS
});
Expand Down

0 comments on commit 552cc27

Please sign in to comment.