aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--net-im/mastoposter/files/mastoposter.initd5
-rw-r--r--net-im/mastoposter/files/mastoposter.service2
-rw-r--r--net-im/mastoposter/mastoposter-0.1-r1.ebuild (renamed from net-im/mastoposter/mastoposter-0.1.ebuild)3
3 files changed, 9 insertions, 1 deletions
diff --git a/net-im/mastoposter/files/mastoposter.initd b/net-im/mastoposter/files/mastoposter.initd
index 0057cddc4..6e3621287 100644
--- a/net-im/mastoposter/files/mastoposter.initd
+++ b/net-im/mastoposter/files/mastoposter.initd
@@ -6,6 +6,7 @@
command="/usr/bin/mastoposter"
command_args="${MASTOPOSTER_CONFIG_FILE:=/etc/mastoposter/config.ini}"
+command_user="mastoposter:mastoposter"
command_background=1
pidfile="/run/${RC_SVCNAME}.pid"
output_log="/var/log/${RC_SVCNAME}.log"
@@ -14,3 +15,7 @@ error_log="${output_log}"
depend() {
need net
}
+
+start_pre() {
+ checkpath -fo "${command_user}" "${output_log}"
+}
diff --git a/net-im/mastoposter/files/mastoposter.service b/net-im/mastoposter/files/mastoposter.service
index 095626e7b..89401ca32 100644
--- a/net-im/mastoposter/files/mastoposter.service
+++ b/net-im/mastoposter/files/mastoposter.service
@@ -5,6 +5,8 @@ Wants=network-online.target
[Service]
Type=simple
+User=mastoposter
+Group=mastoposter
ExecStart=/usr/bin/mastoposter /etc/mastoposter/config.ini
Restart=always
RestartSec=5
diff --git a/net-im/mastoposter/mastoposter-0.1.ebuild b/net-im/mastoposter/mastoposter-0.1-r1.ebuild
index c490eae74..0544f4130 100644
--- a/net-im/mastoposter/mastoposter-0.1.ebuild
+++ b/net-im/mastoposter/mastoposter-0.1-r1.ebuild
@@ -18,6 +18,7 @@ SLOT="0"
KEYWORDS="~amd64"
RDEPEND="
+ acct-user/mastoposter
dev-python/beautifulsoup4[${PYTHON_USEDEP}]
dev-python/emoji[${PYTHON_USEDEP}]
dev-python/httpx[${PYTHON_USEDEP}]
@@ -33,6 +34,6 @@ src_install() {
newconfd "${FILESDIR}"/mastoposter.confd mastoposter
insinto /etc/mastoposter
- insopts --mode 600
+ insopts --mode=600 --owner=${PN} --group=${PN}
doins config.ini
}