net-irc/nemubot: new package
Package-Manager: Portage-2.3.13, Repoman-2.3.3
This commit is contained in:
parent
8b8b7968a2
commit
2ad2c9ec0b
5 changed files with 120 additions and 0 deletions
27
net-irc/nemubot/files/nemubot.init
Normal file
27
net-irc/nemubot/files/nemubot.init
Normal file
|
|
@ -0,0 +1,27 @@
|
|||
#!/sbin/openrc-run
|
||||
# Copyright 1999-2018 Gentoo Foundation
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
|
||||
pidfile=/var/run/nemubot/nemubot.pid
|
||||
command=/usr/bin/nemubot
|
||||
command_args="-A -P $pidfile -S /var/run/nemubot/nemubot.sock -l /var/log/nemubot/nemubot.log -D /var/lib/nemubot/datax/ /etc/nemubot.conf"
|
||||
required_files=/etc/nemubot.conf
|
||||
|
||||
depend() {
|
||||
need localmount net
|
||||
}
|
||||
|
||||
start() {
|
||||
checkpath -d -m 0750 -o nemubot:nemubot /var/run/nemubot/ /var/lib/nemubot/ /var/log/nemubot/
|
||||
|
||||
ebegin "Starting nemubot"
|
||||
start-stop-daemon --start --user nemubot --group nemubot --chdir /var/lib/nemubot/ \
|
||||
--pidfile $pidfile --exec $command -- $command_args
|
||||
eend $?
|
||||
}
|
||||
|
||||
stop() {
|
||||
ebegin "Stoping nemubot"
|
||||
start-stop-daemon --stop --pidfile $pidfile
|
||||
ewend $?
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue