diff --git a/templates/lpmqtt.conf.erb b/templates/lpmqtt.conf.erb index 3b736fb..4e1ad9c 100644 --- a/templates/lpmqtt.conf.erb +++ b/templates/lpmqtt.conf.erb @@ -1,11 +1,11 @@ -[Unit] -Description=lpmqtt Daemon +[imap] +hostname = <%= @imap_hostname %> +username = <%= @imap_username %> +password = <%= @imap_password %> +use_ssl = <%= @imap_use_ssl %> -[Service] -Type=simple -ExecStart=/usr/local/bin/lpmqtt /etc/lpmqtt.conf -User=lpmqtt -Group=lpmqtt - -[Install] -WantedBy=multi-user.target +[mqtt] +hostname = <%= @mqtt_hostname %> +base_topic = <%= @topic %> +username = <%= @mqtt_username %> +password = <%= @mqtt_password %> diff --git a/templates/lpmqtt.service.erb b/templates/lpmqtt.service.erb new file mode 100644 index 0000000..3b736fb --- /dev/null +++ b/templates/lpmqtt.service.erb @@ -0,0 +1,11 @@ +[Unit] +Description=lpmqtt Daemon + +[Service] +Type=simple +ExecStart=/usr/local/bin/lpmqtt /etc/lpmqtt.conf +User=lpmqtt +Group=lpmqtt + +[Install] +WantedBy=multi-user.target