diff options
author | Gluzskiy Alexandr <sss123next@list.ru> | 2015-08-21 08:23:51 +0300 |
---|---|---|
committer | Gluzskiy Alexandr <sss123next@list.ru> | 2015-08-21 08:23:51 +0300 |
commit | 78a121f6623b972e3021d9ada82c41b303f4ec70 (patch) | |
tree | c5d87f7a0eac0a385a224a99dc4187fa9a0f8c77 /net-im/ejabberd/files | |
parent | 5c81329251fca0c1c44b2af97139e5ecec404957 (diff) |
новый файл: files/ejabberd-3.confd
новый файл: files/ejabberd-3.initd
новый файл: files/ejabberd.logrotate
новый файл: files/ejabberd.service
новый файл: files/ejabberd.tmpfiles.conf
Diffstat (limited to 'net-im/ejabberd/files')
-rw-r--r-- | net-im/ejabberd/files/ejabberd-3.confd | 5 | ||||
-rw-r--r-- | net-im/ejabberd/files/ejabberd-3.initd | 47 | ||||
-rw-r--r-- | net-im/ejabberd/files/ejabberd.logrotate | 13 | ||||
-rw-r--r-- | net-im/ejabberd/files/ejabberd.service | 17 | ||||
-rw-r--r-- | net-im/ejabberd/files/ejabberd.tmpfiles.conf | 1 |
5 files changed, 83 insertions, 0 deletions
diff --git a/net-im/ejabberd/files/ejabberd-3.confd b/net-im/ejabberd/files/ejabberd-3.confd new file mode 100644 index 0000000..b1e984e --- /dev/null +++ b/net-im/ejabberd/files/ejabberd-3.confd @@ -0,0 +1,5 @@ +# Please configure everything at /etc/jabber/ejabberdctl.cfg +# Put here only command line arguments for ejabberdctl (if any are required) + +#EJABBERDCTL_OPTS="" + diff --git a/net-im/ejabberd/files/ejabberd-3.initd b/net-im/ejabberd/files/ejabberd-3.initd new file mode 100644 index 0000000..29a30da --- /dev/null +++ b/net-im/ejabberd/files/ejabberd-3.initd @@ -0,0 +1,47 @@ +#!/sbin/runscript +# Copyright 1999-2013 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Id$ + +depend() { + use dns + need net + provide jabber-server +} + +start() { + if ejabberdctl status >/dev/null 2>&1; then + ewarn "ejabberd is already started (manually?)." + return 0 + fi + ebegin "Starting ejabberd" + /usr/sbin/ejabberdctl ${EJABBERDCTL_OPTS} start + eend $? +} + +stop() { + ejabberdctl status >/dev/null 2>&1 + if test $? = 3; then + ewarn "ejabberd is already stopped (manually?)." + return 0 + fi + ebegin "Stopping ejabberd" + if /usr/sbin/ejabberdctl stop >/dev/null 2>&1; then + cnt=0 + sleep 1 + while ejabberdctl status >/dev/null 2>&1 || test $? = 1; do + echo -n . + cnt=`expr $cnt + 1` + if [ $cnt -ge 60 ] ; then + eend 1 + break + fi + sleep 1 + done + eend 0 + else + eend 1 + einfo "Please, run '/usr/sbin/ejabberdctl stop' to see what's going on." + fi + eend 0 +} diff --git a/net-im/ejabberd/files/ejabberd.logrotate b/net-im/ejabberd/files/ejabberd.logrotate new file mode 100644 index 0000000..4f32472 --- /dev/null +++ b/net-im/ejabberd/files/ejabberd.logrotate @@ -0,0 +1,13 @@ +/var/log/jabber/*.log { + su jabber jabber + weekly + rotate 4 + missingok + nocreate + sharedscripts + notifempty + compress + postrotate + /usr/sbin/ejabberdctl reopen-log > /dev/null 2>&1 || true + endscript +} diff --git a/net-im/ejabberd/files/ejabberd.service b/net-im/ejabberd/files/ejabberd.service new file mode 100644 index 0000000..0b79256 --- /dev/null +++ b/net-im/ejabberd/files/ejabberd.service @@ -0,0 +1,17 @@ +[Unit] +Description=A distributed, fault-tolerant Jabber/XMPP server +After=network.target + +[Service] +Type=oneshot +User=jabber +LimitNOFILE=16000 +RestartSec=5 +ExecStart=/usr/sbin/ejabberdctl \ + --config /etc/jabber/ejabberd.cfg --ctl-config /etc/jabber/ejabberdctl.cfg \ + --logs "/var/log/jabber" --spool "/var/spool/jabber" start +ExecStop=/usr/sbin/ejabberdctl stop +RemainAfterExit=yes + +[Install] +WantedBy=multi-user.target diff --git a/net-im/ejabberd/files/ejabberd.tmpfiles.conf b/net-im/ejabberd/files/ejabberd.tmpfiles.conf new file mode 100644 index 0000000..cf17b73 --- /dev/null +++ b/net-im/ejabberd/files/ejabberd.tmpfiles.conf @@ -0,0 +1 @@ +d /var/lock/ejabberdctl 0750 jabber jabber |