Skip to content

Instantly share code, notes, and snippets.

@Ovis
Created May 5, 2020 05:49
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Ovis/61b61e2d28b1ddd9987eb94046414170 to your computer and use it in GitHub Desktop.
Save Ovis/61b61e2d28b1ddd9987eb94046414170 to your computer and use it in GitHub Desktop.
MQTTClient Systemd
[Unit]
Description=MQTT Home Client
DefaultDependencies=no
ConditionPathExists=[MQTTクライアントのディレクトリパス]
Wants=network.target
After=network.target
[Service]
Type=oneshot
RemainAfterExit=no
ExecStart=[.NET Coreの絶対パス]/dotnet [MQTTクライアント(.dll)の絶対パス]
SyslogIdentifier=MqttHomeClient
WorkingDirectory=[MQTTクライアントのディレクトリパス]
Environment=ASPNETCORE_ENVIRONMENT=Production
KillMode=process
[Install]
WantedBy = multi-user.target
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment