From f7b0150688ad215b3523bce23612220119afe1b7 Mon Sep 17 00:00:00 2001 From: jude Date: Thu, 23 Mar 2023 13:32:29 +0000 Subject: [PATCH] Add services --- Cargo.toml | 14 +++++++++++++- conf/default | 0 debian/.gitignore | 2 ++ systemd/soundfx-rs.service | 14 ++++++++++++++ 4 files changed, 29 insertions(+), 1 deletion(-) create mode 100644 conf/default create mode 100644 debian/.gitignore create mode 100644 systemd/soundfx-rs.service diff --git a/Cargo.toml b/Cargo.toml index cd3ddf9..09bbb66 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,5 +1,7 @@ [package] name = "soundfx-rs" +description = "Discord bot for custom sound effects and soundboards" +license = "AGPL-3.0-only" version = "1.5.7" authors = ["jellywx "] edition = "2018" @@ -22,4 +24,14 @@ serde = "1.0" serenity = { version = "0.11.5" } [package.metadata.deb] -depends = ["$auto", "ffmpeg", "libopus-dev"] +depends = "$auto, ffmpeg" +suggests = "mysql-server-8.0" +maintainer-scripts = "debian" +assets = [ + ["target/release/soundfx-rs", "usr/bin/soundfx-rs", "755"], + ["conf/default", "etc/soundfx-rs/default", "600"] +] + +[package.metadata.deb.systemd-units] +unit-scripts = "systemd" +start = false diff --git a/conf/default b/conf/default new file mode 100644 index 0000000..e69de29 diff --git a/debian/.gitignore b/debian/.gitignore new file mode 100644 index 0000000..d6b7ef3 --- /dev/null +++ b/debian/.gitignore @@ -0,0 +1,2 @@ +* +!.gitignore diff --git a/systemd/soundfx-rs.service b/systemd/soundfx-rs.service new file mode 100644 index 0000000..51fd8b0 --- /dev/null +++ b/systemd/soundfx-rs.service @@ -0,0 +1,14 @@ +[Unit] +Description=Discord bot for custom sound effects and soundboards + +[Service] +Type=simple +ExecStart=/usr/bin/soundfx-rs +WorkingDirectory=/etc/soundfx-rs +Restart=always +RestartSec=4 +# Environment="RUST_LOG=warn,soundfx_rs=info" +# Environment="RUST_BACKTRACE=full" + +[Install] +WantedBy=multi-user.target