diff options
author | Caleb Maclennan | 2021-05-05 13:11:11 +0300 |
---|---|---|
committer | Caleb Maclennan | 2021-05-05 13:13:51 +0300 |
commit | 9c04ccc7579236556104a3df1b6b40741944fcdf (patch) | |
tree | 3142b8bbf9818c92d7b8d89fc37ca972d082e5bc | |
parent | c21035c06c81c0773a04a5ec1692e0766525bdd1 (diff) | |
download | aur-9c04ccc7579236556104a3df1b6b40741944fcdf.tar.gz |
Add systemd service
-rw-r--r-- | .SRCINFO | 6 | ||||
-rw-r--r-- | PKGBUILD | 24 | ||||
-rw-r--r-- | listmonk.conf | 1 | ||||
-rw-r--r-- | listmonk.service | 15 |
4 files changed, 36 insertions, 10 deletions
@@ -1,7 +1,7 @@ pkgbase = listmonk-bin pkgdesc = Self-hosted newsletter and mailing list manager with a modern dashboard pkgver = 0.9.0 - pkgrel = 1 + pkgrel = 2 url = https://listmonk.app install = listmonk.install arch = x86_64 @@ -9,7 +9,11 @@ pkgbase = listmonk-bin depends = postgresql backup = etc/listmonk/config.toml source = https://github.com/knadh/listmonk/releases/download/v0.9.0-beta/listmonk_0.9.0-beta_linux_amd64.tar.gz + source = listmonk.conf + source = listmonk.service sha256sums = 1137f572fd93b25034865cb638d169acb1bd9b87d6848c274405bc6108dad62c + sha256sums = 5cfc186438df2408ed88a5bec3a9a4b5f2afb0d3aec41c4cc63b2f5eb810b3cb + sha256sums = 4852f206b7763ba047ba123d663cadb806f437967154ebe837845198b3266533 pkgname = listmonk-bin @@ -2,25 +2,31 @@ pkgname=listmonk-bin pkgver=0.9.0 -pkgrel=1 -pkgdesc="Self-hosted newsletter and mailing list manager with a modern dashboard" +pkgrel=2 +pkgdesc='Self-hosted newsletter and mailing list manager with a modern dashboard' arch=(x86_64) url=https://listmonk.app license=(AGPL3) depends=(postgresql) backup=(etc/listmonk/config.toml) install=${pkgname%-bin}.install -source=("https://github.com/knadh/${pkgname%-bin}/releases/download/v$pkgver-beta/${pkgname%-bin}_$pkgver-beta_linux_amd64.tar.gz") -sha256sums=('1137f572fd93b25034865cb638d169acb1bd9b87d6848c274405bc6108dad62c') +source=("https://github.com/knadh/${pkgname%-bin}/releases/download/v$pkgver-beta/${pkgname%-bin}_$pkgver-beta_linux_amd64.tar.gz" + "${pkgname%-bin}.conf" + "${pkgname%-bin}.service") +sha256sums=('1137f572fd93b25034865cb638d169acb1bd9b87d6848c274405bc6108dad62c' + '5cfc186438df2408ed88a5bec3a9a4b5f2afb0d3aec41c4cc63b2f5eb810b3cb' + '4852f206b7763ba047ba123d663cadb806f437967154ebe837845198b3266533') _sample_pw=TKByjizucIoex3mA build() { - rm -f config.toml - ./${pkgname%-bin} --new-config - sed -i -e "/admin_password/s,\".+\",\"$_sample_pw\"," config.toml + rm -f config.toml + ./${pkgname%-bin} --new-config + sed -i -e "/admin_password/s,\".*\",\"$_sample_pw\"," config.toml } package() { - install -Dm755 -t "$pkgdir/usr/bin" ${pkgname%-bin} - install -Dm600 -t "$pkgdir/etc/${pkgname%-bin}" config.toml + install -Dm755 -t "$pkgdir/usr/bin" ${pkgname%-bin} + install -Dm600 -t "$pkgdir/etc/${pkgname%-bin}" config.toml + install -Dm644 -t "$pkgdir/usr/lib/systemd/system/" "${pkgname%-bin}.service" + install -Dm644 -t "$pkgdir/usr/lib/sysusers.d/" "${pkgname%-bin}.conf" } diff --git a/listmonk.conf b/listmonk.conf new file mode 100644 index 000000000000..b7e2c672488c --- /dev/null +++ b/listmonk.conf @@ -0,0 +1 @@ +u listmonk - "Listmonk mailing list and newsletter manager" diff --git a/listmonk.service b/listmonk.service new file mode 100644 index 000000000000..6532baa15cdd --- /dev/null +++ b/listmonk.service @@ -0,0 +1,15 @@ +[Unit] +Description=Listmonk mailing list and newsletter manager +Wants=network.target + +[Service] +Type=simple +ExecStart=/usr/bin/listmonk --config /etc/listmonk/config.toml +User=listmonk +Group=listmonk +Restart=on-failure +LimitNOFILE=65536 +TasksMax=infinity + +[Install] +WantedBy=multi-user.target |