mirror of
https://github.com/gentoo-mirror/guru.git
synced 2025-04-21 07:52:21 -04:00
net-im/mastoposter: don't run as root
Signed-off-by: Anna (cybertailor) Vyalkova <cyber+gentoo@sysrq.in>
This commit is contained in:
parent
01e94549ad
commit
31af51e4bf
@ -6,6 +6,7 @@
|
|||||||
|
|
||||||
command="/usr/bin/mastoposter"
|
command="/usr/bin/mastoposter"
|
||||||
command_args="${MASTOPOSTER_CONFIG_FILE:=/etc/mastoposter/config.ini}"
|
command_args="${MASTOPOSTER_CONFIG_FILE:=/etc/mastoposter/config.ini}"
|
||||||
|
command_user="mastoposter:mastoposter"
|
||||||
command_background=1
|
command_background=1
|
||||||
pidfile="/run/${RC_SVCNAME}.pid"
|
pidfile="/run/${RC_SVCNAME}.pid"
|
||||||
output_log="/var/log/${RC_SVCNAME}.log"
|
output_log="/var/log/${RC_SVCNAME}.log"
|
||||||
@ -14,3 +15,7 @@ error_log="${output_log}"
|
|||||||
depend() {
|
depend() {
|
||||||
need net
|
need net
|
||||||
}
|
}
|
||||||
|
|
||||||
|
start_pre() {
|
||||||
|
checkpath -fo "${command_user}" "${output_log}"
|
||||||
|
}
|
||||||
|
@ -5,6 +5,8 @@ Wants=network-online.target
|
|||||||
|
|
||||||
[Service]
|
[Service]
|
||||||
Type=simple
|
Type=simple
|
||||||
|
User=mastoposter
|
||||||
|
Group=mastoposter
|
||||||
ExecStart=/usr/bin/mastoposter /etc/mastoposter/config.ini
|
ExecStart=/usr/bin/mastoposter /etc/mastoposter/config.ini
|
||||||
Restart=always
|
Restart=always
|
||||||
RestartSec=5
|
RestartSec=5
|
||||||
|
@ -18,6 +18,7 @@ SLOT="0"
|
|||||||
KEYWORDS="~amd64"
|
KEYWORDS="~amd64"
|
||||||
|
|
||||||
RDEPEND="
|
RDEPEND="
|
||||||
|
acct-user/mastoposter
|
||||||
dev-python/beautifulsoup4[${PYTHON_USEDEP}]
|
dev-python/beautifulsoup4[${PYTHON_USEDEP}]
|
||||||
dev-python/emoji[${PYTHON_USEDEP}]
|
dev-python/emoji[${PYTHON_USEDEP}]
|
||||||
dev-python/httpx[${PYTHON_USEDEP}]
|
dev-python/httpx[${PYTHON_USEDEP}]
|
||||||
@ -33,6 +34,6 @@ src_install() {
|
|||||||
newconfd "${FILESDIR}"/mastoposter.confd mastoposter
|
newconfd "${FILESDIR}"/mastoposter.confd mastoposter
|
||||||
|
|
||||||
insinto /etc/mastoposter
|
insinto /etc/mastoposter
|
||||||
insopts --mode 600
|
insopts --mode=600 --owner=${PN} --group=${PN}
|
||||||
doins config.ini
|
doins config.ini
|
||||||
}
|
}
|
Loading…
x
Reference in New Issue
Block a user