fixed openrc script, fixed ebuild
This commit is contained in:
parent
f3790cb5e1
commit
b66f1ba788
|
@ -7,7 +7,6 @@
|
||||||
description="expandurl-mastodon - Mastodon bot that expands shortened URLs."
|
description="expandurl-mastodon - Mastodon bot that expands shortened URLs."
|
||||||
pidfile="/var/run/expandurl-mastodon.pid"
|
pidfile="/var/run/expandurl-mastodon.pid"
|
||||||
command="/usr/bin/expandurl-mastodon"
|
command="/usr/bin/expandurl-mastodon"
|
||||||
command_args="-p ${pidfile} ${NTPD_OPTS}"
|
|
||||||
start_stop_daemon_args="-b -m --pidfile ${pidfile} -u ${EXPANDURL_USER}"
|
start_stop_daemon_args="-b -m --pidfile ${pidfile} -u ${EXPANDURL_USER}"
|
||||||
|
|
||||||
depend() {
|
depend() {
|
||||||
|
@ -15,8 +14,14 @@ depend() {
|
||||||
}
|
}
|
||||||
|
|
||||||
start_pre() {
|
start_pre() {
|
||||||
if [ ! -f ${HOME}/.config/expandurl-mastodon.cfg ] ; then
|
local user_home="$(getent passwd ${EXPANDURL_USER} | cut -d: -f6)"
|
||||||
eerror "Please create ${HOME}/.config/expandurl-mastodon.cfg"
|
if [ -z ${user_home} ]; then
|
||||||
|
eerror "Home directory of \"${EXPANDURL_USER}\" not found"
|
||||||
|
return 1
|
||||||
|
fi
|
||||||
|
|
||||||
|
if [ ! -f ${user_home}/.config/expandurl-mastodon.cfg ] ; then
|
||||||
|
eerror "Please create ${user_home}/.config/expandurl-mastodon.cfg"
|
||||||
return 1
|
return 1
|
||||||
fi
|
fi
|
||||||
return 0
|
return 0
|
||||||
|
|
|
@ -24,6 +24,6 @@ src_unpack() {
|
||||||
src_install() {
|
src_install() {
|
||||||
cmake-utils_src_install
|
cmake-utils_src_install
|
||||||
dodoc README.md
|
dodoc README.md
|
||||||
doinitd init/expandurl-mastodon.openrc expandurl-mastodon
|
newinitd init/expandurl-mastodon.openrc expandurl-mastodon
|
||||||
echo "EXPANDURL_USER=\"expandurl\"" | doconfd - expandurl-mastodon
|
echo "EXPANDURL_USER=\"expandurl\"" | newconfd - expandurl-mastodon
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue
Block a user