diff --git a/Cargo.lock b/Cargo.lock index aa400d6..f0f5389 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -451,7 +451,7 @@ dependencies = [ [[package]] name = "broker" -version = "6.1.1" +version = "6.1.2" dependencies = [ "anyhow", "async-std", diff --git a/Cargo.toml b/Cargo.toml index 61557f8..0ae3b88 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "broker" -version = "6.1.1" +version = "6.1.2" authors = ["Bevan Hunt "] edition = "2018" license = "MIT" diff --git a/README.md b/README.md index 03922bd..146f2f3 100644 --- a/README.md +++ b/README.md @@ -118,6 +118,9 @@ will return: `200` or `500` or `400` or `401` - the db can be passed in as a flag where the embedded database will be saved - default tmp - example: `./broker --db="tmp" --port="443" --secure="true" --origin="*" --jwt_expiry="86400" --jwt_secret="secret" --key_path="broker.rsa" --cert_path="broker.pem"` +### Service + +There is an example `systemctl` service for Ubuntu called `broker.service` in the code ### TechStack diff --git a/broker.service b/broker.service new file mode 100644 index 0000000..b8c0568 --- /dev/null +++ b/broker.service @@ -0,0 +1,13 @@ +[Unit] +Description=Broker +After=network.target +StartLimitIntervalSec=0 +[Service] +Type=simple +Restart=always +RestartSec=1 +User=root +ExecStart=/root/broker + +[Install] +WantedBy=multi-user.target