????JFIF??x?x????'
| Server IP : 79.136.114.73 / Your IP : 216.73.216.36 Web Server : Apache/2.4.7 (Ubuntu) PHP/5.5.9-1ubuntu4.29 OpenSSL/1.0.1f System : Linux b8009 3.13.0-170-generic #220-Ubuntu SMP Thu May 9 12:40:49 UTC 2019 x86_64 User : www-data ( 33) PHP Version : 5.5.9-1ubuntu4.29 Disable Function : pcntl_alarm,pcntl_fork,pcntl_waitpid,pcntl_wait,pcntl_wifexited,pcntl_wifstopped,pcntl_wifsignaled,pcntl_wexitstatus,pcntl_wtermsig,pcntl_wstopsig,pcntl_signal,pcntl_signal_dispatch,pcntl_get_last_error,pcntl_strerror,pcntl_sigprocmask,pcntl_sigwaitinfo,pcntl_sigtimedwait,pcntl_exec,pcntl_getpriority,pcntl_setpriority, MySQL : ON | cURL : ON | WGET : ON | Perl : ON | Python : ON | Sudo : ON | Pkexec : ON Directory : /etc/bash_completion.d/ |
Upload File : |
# bash-completion for the upstart event-based init replacement
# (http://upstart.ubuntu.com / https://launchpad.net/upstart)
#
# We don't provide completion for 'init' itself for obvious reasons.
have initctl &&
_upstart_jobs()
{
initctl list|awk '{print $1}'|sort -u
} &&
_upstart_startable_jobs()
{
initctl list|cut -d\, -f1|awk '$2 == "stop/waiting" {print $1}'
} &&
_upstart_stoppable_jobs()
{
initctl list|cut -d\, -f1|awk '$2 == "start/running" {print $1}'
} &&
_upstart_events()
{
# note that we don't provide the internal events such as "starting"
# (and those from mountall) since the user should be using the
# associated command to emit such events.
(cd /etc/init && \
egrep '^[[:space:]]*emits ' *.conf |\
cut -d: -f2- | sed 's/^[[:space:]]*emits //g' |\
tr ' ' '\n' | awk '{print $NF}' | grep -v ^$|sort -u)
} &&
_upstart_initctl()
{
_get_comp_words_by_ref cur prev
COMPREPLY=()
case "$prev" in
start)
COMPREPLY=( $(compgen -W "-n --no-wait $(_upstart_startable_jobs)" -- ${cur}) )
return 0
;;
stop)
COMPREPLY=( $(compgen -W "-n --no-wait $(_upstart_stoppable_jobs)" -- ${cur}) )
return 0
;;
emit)
COMPREPLY=( $(compgen -W "-n --no-wait $(_upstart_events)" -- ${cur}) )
return 0
;;
-i|--ignore-events)
# handle visualisation options after check-config command
for cmd in check-config
do
cwords=${COMP_WORDS[@]##}
filtered_cwords=${COMP_WORDS[@]##${cmd}}
if [ "$filtered_cwords" != "$cwords" ]
then
COMPREPLY=( $(compgen -W "$(_upstart_jobs)" -- ${cur}) )
return 0
fi
done
;;
-e|--enumerate)
# handle visualisation options after show-config command
for cmd in show-config
do
cwords=${COMP_WORDS[@]##}
filtered_cwords=${COMP_WORDS[@]##${cmd}}
if [ "$filtered_cwords" != "$cwords" ]
then
COMPREPLY=( $(compgen -W "$(_upstart_jobs)" -- ${cur}) )
return 0
fi
done
;;
reload|restart)
COMPREPLY=( $(compgen -W "-n --no-wait $(_upstart_stoppable_jobs)" -- ${cur}) )
return 0
;;
status)
COMPREPLY=( $(compgen -W "$(_upstart_jobs)" -- ${cur}) )
return 0
;;
check-config)
COMPREPLY=( $(compgen -W "-w --warn -i --ignore-events= $(_upstart_jobs)" -- ${cur}) )
return 0
;;
show-config)
COMPREPLY=( $(compgen -W "-e --enumerate $(_upstart_jobs)" -- ${cur}) )
return 0
;;
-n|--no-wait)
# allow 'no wait' for certain commands
for cmd in start stop restart emit
do
cwords=${COMP_WORDS[@]##}
filtered_cwords=${COMP_WORDS[@]##${cmd}}
if [ "$filtered_cwords" != "$cwords" ]
then
case "$cmd" in
start)
COMPREPLY=( $(compgen -W "$(_upstart_startable_jobs)" -- ${cur}) )
;;
stop)
COMPREPLY=( $(compgen -W "$(_upstart_stoppable_jobs)" -- ${cur}) )
;;
restart)
COMPREPLY=( $(compgen -W "$(_upstart_stoppable_jobs)" -- ${cur}) )
;;
emit)
COMPREPLY=( $(compgen -W "$(_upstart_events)" -- ${cur}) )
;;
esac
return 0
fi
done
;;
--help|--version)
COMPREPLY=()
return 0
;;
esac
opts="--help --version -q --quiet -v --verbose --session --system --dest="
cmds=$(initctl help|grep "^ [^ ]"|awk '{print $1}')
COMPREPLY=( $(compgen -W "${opts} ${cmds}" -- ${cur}) )
} && complete -F _upstart_initctl initctl
have start &&
_upstart_start()
{
COMPREPLY=()
_get_comp_words_by_ref cur prev
opts="--help --version -q --quiet -v --verbose --session --system --dest= \
-n --no-wait"
case "$prev" in
--help|--version)
COMPREPLY=()
return 0
;;
esac
COMPREPLY=( $(compgen -W "$opts $(_upstart_startable_jobs)" -- ${cur}) )
return 0
} && complete -F _upstart_start start
have stop &&
_upstart_stop()
{
COMPREPLY=()
_get_comp_words_by_ref cur prev
opts="--help --version -q --quiet -v --verbose --session --system --dest= \
-n --no-wait"
case "$prev" in
--help|--version)
COMPREPLY=()
return 0
;;
esac
COMPREPLY=( $(compgen -W "$opts $(_upstart_stoppable_jobs)" -- ${cur}) )
return 0
} && complete -F _upstart_stop stop
have restart &&
_upstart_restart()
{
COMPREPLY=()
_get_comp_words_by_ref cur prev
opts="--help --version -q --quiet -v --verbose --session --system --dest= \
-n --no-wait"
case "$prev" in
--help|--version)
COMPREPLY=()
return 0
;;
esac
COMPREPLY=( $(compgen -W "$opts $(_upstart_stoppable_jobs)" -- ${cur}) )
return 0
} && complete -F _upstart_restart restart
have status &&
_upstart_status()
{
COMPREPLY=()
_get_comp_words_by_ref cur prev
opts="--help --version -q -d --detail -e --enumerate --quiet -v --verbose --session --system --dest="
case "$prev" in
--help|--version)
COMPREPLY=()
return 0
;;
esac
COMPREPLY=( $(compgen -W "$opts $(_upstart_jobs)" -- ${cur}) )
return 0
} && complete -F _upstart_status status
have reload &&
_upstart_reload()
{
COMPREPLY=()
_get_comp_words_by_ref cur prev
opts="--help --version -q --quiet -v --verbose --session --system --dest="
case "$prev" in
--help|--version)
COMPREPLY=()
return 0
;;
esac
COMPREPLY=( $(compgen -W "$opts $(_upstart_stoppable_jobs)" -- ${cur}) )
return 0
} && complete -F _upstart_reload reload