From 8538997d615f58ef061115731eaf0b09d47595ce Mon Sep 17 00:00:00 2001 From: Jamie Nguyen Date: Sat, 22 Feb 2014 10:27:40 +0000 Subject: Update FSF address --- tools/configure.erl | 7 +++---- tools/p1_prof.erl | 7 +++---- 2 files changed, 6 insertions(+), 8 deletions(-) (limited to 'tools') diff --git a/tools/configure.erl b/tools/configure.erl index 6f0b1dd4e..aa7feee31 100644 --- a/tools/configure.erl +++ b/tools/configure.erl @@ -17,10 +17,9 @@ %%% MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU %%% General Public License for more details. %%% -%%% You should have received a copy of the GNU General Public License -%%% along with this program; if not, write to the Free Software -%%% Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA -%%% 02111-1307 USA +%%% You should have received a copy of the GNU General Public License along +%%% with this program; if not, write to the Free Software Foundation, Inc., +%%% 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. %%% %%%---------------------------------------------------------------------- diff --git a/tools/p1_prof.erl b/tools/p1_prof.erl index d73f06f05..44fb9f766 100644 --- a/tools/p1_prof.erl +++ b/tools/p1_prof.erl @@ -18,10 +18,9 @@ %%% MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU %%% General Public License for more details. %%% -%%% You should have received a copy of the GNU General Public License -%%% along with this program; if not, write to the Free Software -%%% Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA -%%% 02111-1307 USA +%%% You should have received a copy of the GNU General Public License along +%%% with this program; if not, write to the Free Software Foundation, Inc., +%%% 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. %%% %%%------------------------------------------------------------------- -module(p1_prof). -- cgit v1.2.3 From 633d47f7845c6295f5c3cf46c3a92972713b4951 Mon Sep 17 00:00:00 2001 From: Badlop Date: Thu, 13 Mar 2014 12:29:21 +0100 Subject: Update copyright dates to 2014 (EJAB-1679) --- tools/configure.erl | 2 +- tools/p1_prof.erl | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) (limited to 'tools') diff --git a/tools/configure.erl b/tools/configure.erl index 6f0b1dd4e..e2523f85d 100644 --- a/tools/configure.erl +++ b/tools/configure.erl @@ -5,7 +5,7 @@ %%% Created : 27 Jan 2003 by Alexey Shchepin %%% %%% -%%% ejabberd, Copyright (C) 2002-2013 ProcessOne +%%% ejabberd, Copyright (C) 2002-2014 ProcessOne %%% %%% This program is free software; you can redistribute it and/or %%% modify it under the terms of the GNU General Public License as diff --git a/tools/p1_prof.erl b/tools/p1_prof.erl index d73f06f05..9cfb3a6dc 100644 --- a/tools/p1_prof.erl +++ b/tools/p1_prof.erl @@ -6,7 +6,7 @@ %%% Created : 23 Jan 2010 by Evgeniy Khramtsov %%% %%% -%%% ejabberd, Copyright (C) 2002-2013 ProcessOne +%%% ejabberd, Copyright (C) 2002-2014 ProcessOne %%% %%% This program is free software; you can redistribute it and/or %%% modify it under the terms of the GNU General Public License as -- cgit v1.2.3 From 5bf3c784da68e4fa58cde0105a9e13f5b6651e31 Mon Sep 17 00:00:00 2001 From: Badlop Date: Wed, 26 Mar 2014 16:43:40 +0100 Subject: New Bash completion script for ejabberdctl, experimental (EJAB-1042) --- tools/ejabberdctl.bc | 99 ++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 99 insertions(+) create mode 100644 tools/ejabberdctl.bc (limited to 'tools') diff --git a/tools/ejabberdctl.bc b/tools/ejabberdctl.bc new file mode 100644 index 000000000..72a5356f2 --- /dev/null +++ b/tools/ejabberdctl.bc @@ -0,0 +1,99 @@ +# +# bash completion for ejabberdctl +# +get_help() +{ + local COMMANDCACHE=/var/log/ejabberd/bash_completion_$RANDOM + ejabberdctl $CTLARGS help >$COMMANDCACHE + if [[ $? == 2 ]] ; then + ISRUNNING=1 + runningcommands=`cat $COMMANDCACHE | grep "^ [a-z]" | awk '{print $1}' | xargs` + fi + rm $COMMANDCACHE +} + +_ejabberdctl() +{ + local cur prev + local ISRUNNING=0 + local runningcommands + + COMPREPLY=() + cur="${COMP_WORDS[COMP_CWORD]}" + prev="${COMP_WORDS[COMP_CWORD-1]}" + + local startcoms="start debug live" + local startpars="--config-dir --config --ctl-config --logs --spool" + + local i=1 + local CTLARGS="" + while [ $i -lt $COMP_CWORD ] ; do + local PARAM="${COMP_WORDS[i]}" + i=$((i+1)) + case $PARAM in + --*) + CTLARGS="--node ${COMP_WORDS[i]}" + i=$((i+1)) ;; + *) break ;; + esac + done + + case "${prev##*/}" in + ejabberdctl) + # This clause matches even when calling `/sbin/ejabberdctl` thanks to the ##*/ in the case + get_help + COMPREPLY=($(compgen -W "--node --auth ${startpars} ${startcoms} ${runningcommands}" -- $cur)) + return 0 + ;; + start|live) + COMPREPLY=($(compgen -W "--node ${startpars}" -- $cur)) + return 0 + ;; + debug) + COMPREPLY=($(compgen -W "--node" -- $cur)) + return 0 + ;; + help) + get_help + COMPREPLY=($(compgen -W "${runningcommands}" -- $cur)) + return 0 + ;; + --node) + RUNNINGNODES=`epmd -names | grep name | awk '{print $2"@localhost"}' | xargs` + COMPREPLY=($(compgen -W "$RUNNINGNODES" -- $cur)) + return 0 + ;; + --config|--ctl-config) + _filedir '?(u)cfg' + return 0 + ;; + --config-dir|--logs|--spool) + _filedir + return 0 + ;; + *) + prev2="${COMP_WORDS[COMP_CWORD-2]}" + get_help + if [[ "$prev2" == --* ]]; then + COMPREPLY=($(compgen -W "--node --auth ${startpars} ${startcoms} ${runningcommands}" -- $cur)) + else + if [[ $ISRUNNING == 1 ]]; then + echo "" + ejabberdctl $CTLARGS help ${PARAM} + echo -n "${COMP_LINE}" + fi + fi + return 0 + ;; + esac +} + +complete -F _ejabberdctl ejabberdctl + +# Local variables: +# mode: shell-script +# sh-basic-offset: 4 +# sh-indent-comment: t +# indent-tabs-mode: nil +# End: +# ex: ts=4 sw=4 et filetype=sh -- cgit v1.2.3