master
gotbletu 2 months ago
parent 5324dca5f0
commit 7885335f41

@ -0,0 +1,93 @@
# aMule on the command line
- aMulecmd demo: https://youtu.be/IpHdH1mCUVc
- amule, emule, ed2k, edonkey2000, kademlia, p2p, file sharing, emule
#### enable amule remote controls
- amule > preferences > remote controls > [x] accept external connections
- amule > preferences > remote controls > password > [0123456789]
#### generate a remote.conf
----
# amulecmd -h hostname -p ECport -P ECpassword -w
# amulecmd -h 192.168.1.xxx -p 4712 -P 0123456789 -w
amulecmd -h localhost -p 4712 -P 0123456789 -w
----
#### amulecmd.conf
- put amulecmd.conf in ~/.aMule/amulecmd.conf
- make sure all the login stuff is correct
#### start daemon
amuled --full-daemon
#### start text client
amulecmd
#### using scripts to start daemon and text client
amulecli-daemon-start ; amulecli-textmode
#### Example Tmux Layout for Localhost
session="amule"
sessionexists=$(tmux list-sessions | grep "^$session":)
if [ -z "$sessionexists" ]; then
# create new session
tmux new-session -d -s "$session" -c "$HOME"
tmux new-window -t "$session":0 -n 'results' -c "$HOME"
tmux rename-window -t "$session":0 'results'
tmux send-keys -t "$session":0 "while true; do amulecli-results-hightop | less ; done" C-m
tmux split-window -t "$session":0 -v -l 10 -c "$HOME"
tmux send-keys -t "$session":0 'amulecli-daemon-start ; amulecli-textmode' C-m
tmux new-window -t "$session":1 -n 'list-watch' -c "$HOME"
tmux send-keys -t "$session":1 'watch -n 5 -t amulecli-list' C-m
tmux split-window -t "$session":1 -v -l 15 -c "$HOME"
tmux new-window -t "$session":2 -n 'servers' -c "$HOME"
tmux send-keys -t "$session":2 'watch -n 60 -t amulecli-servers' C-m
tmux split-window -t "$session":2 -v -l 10 -c "$HOME"
tmux send-keys -t "$session":2 'amulecli-textmode' C-m
tmux new-window -t "$session":3 -n 'amulebay' -c "$HOME"
tmux send-keys -t "$session":3 "while true; do \
tmux rename-window -t $session:3 amulebay && clear && \
ranger ~/.aMule/Incoming ~/.aMule/Temp \
--cmd='set preview_files false' ; done" C-m
tmux switch-client -t "$session":0
else
tmux switch-client -t "$session"
fi
#### Example Tmux Layout for Server
session="amule-server"
sessionexists=$(tmux list-sessions | grep "^$session":)
if [ -z "$sessionexists" ]; then
# create new session
tmux new-session -d -s "$session" -c "$HOME"
tmux new-window -t "$session":0 -n 'results' -c "$HOME"
tmux rename-window -t "$session":0 'results'
tmux send-keys -t "$session":0 "while true; do amulecli-results-hightop --config ~/.aMule/amulecmd-server.conf | less ; done" C-m
tmux split-window -t "$session":0 -v -l 10 -c "$HOME"
tmux send-keys -t "$session":0 'amulecli-textmode --config ~/.aMule/amulecmd-server.conf' C-m
tmux new-window -t "$session":1 -n 'list-watch' -c "$HOME"
tmux send-keys -t "$session":1 'watch -n 5 -t amulecli-list --config ~/.aMule/amulecmd-server.conf' C-m
tmux split-window -t "$session":1 -v -l 15 -c "$HOME"
tmux new-window -t "$session":2 -n 'servers' -c "$HOME"
tmux send-keys -t "$session":2 'watch -n 60 -t amulecli-servers --config ~/.aMule/amulecmd-server.conf' C-m
tmux split-window -t "$session":2 -v -l 10 -c "$HOME"
tmux send-keys -t "$session":2 'amulecli-textmode --config ~/.aMule/amulecmd-server.conf' C-m
tmux new-window -t "$session":3 -n 'amulebay' -c "$HOME"
tmux send-keys -t "$session":3 "while true; do \
tmux rename-window -t $session:3 amulebay && clear && \
ranger /run/user/1000/sshfs/heoyea@192.168.1.131/alfa/amule/completed \
--cmd='set preview_files false' ; done" C-m
tmux switch-client -t "$session":0
else
tmux switch-client -t "$session"
fi

@ -0,0 +1,37 @@
#!/usr/bin/env sh
# author: gotbletu (@youtube|github|odysee)
# https://www.youtube.com/user/gotbletu
helpmsg() {
cat <<EOF
desc: fzf change amule ed2k server
depend: amule fzf coreutils
options:
-c, --config Use a different config
-h, --help Show help page
example:
${0##*/} -c ~/.aMule/amulecmd-server.conf
EOF
}
if [ $# -lt 1 ]; then
source ~/.aMule/amulecmd.conf
elif [ "$1" = -c ] || [ "$1" = --config ]; then
source "$2"
elif [ "$1" = -h ] || [ "$1" = --help ]; then
helpmsg
exit
fi
export FZF_DEFAULT_OPTS="-e -i --info=hidden --layout=reverse --scroll-off=5 --tiebreak=index --bind 'home:first,end:last,tab:down,shift-tab:up,ctrl-p:half-page-up,ctrl-n:half-page-down,ctrl-b:page-up,ctrl-f:page-down,ctrl-h:first,ctrl-l:last' --header 'C-j/k/n/p/f/b/h/l|Tab/Shift-Tab/End/Home:navigate'"
domule() {
amulecmd --password "$amu_pass" --host "$amu_host" --port "$amu_port" --command "$@" 2>/dev/null | grep "^ >"
}
selected="$(domule "show servers" | fzf --prompt="amulecmd - connect to server: " | cut -d '[' -f2 | cut -d ']' -f1)"
[ -z "$selected" ] && exit
domule "connect $selected"

@ -0,0 +1,7 @@
#!/usr/bin/env sh
# author: gotbletu (@youtube|github|odysee)
# https://www.youtube.com/user/gotbletu
# desc: kill local amule daemon and webui
killall -9 amuled 2>/dev/null
killall -9 amuleweb 2>/dev/null

@ -0,0 +1,11 @@
#!/usr/bin/env sh
# author: gotbletu (@youtube|github|odysee)
# https://www.youtube.com/user/gotbletu
# demo: https://youtu.be/IpHdH1mCUVc
# desc: start amule daemon
# using until loop because the daemon doesnt always start
until [ "$(pidof -x amuled | wc -l)" = 1 ] ; do
amuled --full-daemon
sleep 8
done

@ -0,0 +1,40 @@
#!/usr/bin/env sh
# author: gotbletu (@youtube|github|odysee)
# https://www.youtube.com/user/gotbletu
# demo: https://youtu.be/IpHdH1mCUVc
helpmsg() {
cat <<EOF
desc: cancel amule selected file downloads using fzf
depend: amule grep fzf coreutils
options:
-c, --config Use a different config
-h, --help Show help page
example:
${0##*/} -c ~/.aMule/amulecmd-server.conf
EOF
}
if [ $# -lt 1 ]; then
source ~/.aMule/amulecmd.conf
elif [ "$1" = -c ] || [ "$1" = --config ]; then
source "$2"
elif [ "$1" = -h ] || [ "$1" = --help ]; then
helpmsg
exit
fi
export FZF_DEFAULT_OPTS="--exact --ignore-case --no-sort --multi --tac --info=hidden --layout=reverse --scroll-off=5 --tiebreak=index --bind 'home:first,end:last,ctrl-p:half-page-up,ctrl-n:half-page-down,ctrl-b:page-up,ctrl-f:page-down,ctrl-h:first,ctrl-l:last' --header 'C-j/k/n/p/f/b/h/l:navigate Tab:mark/unmark Enter:select'"
domule() {
amulecmd --password "$amu_pass" --host "$amu_host" --port "$amu_port" --command "$@" 2>/dev/null \
| grep "^ >" | paste -d " " - - | grep "Downloading\|Paused\|Waiting" | cut -d '>' -f2 | cut -c 2-
}
domulecmd() {
amulecmd --password "$amu_pass" --host "$amu_host" --port "$amu_port" --command "$@" 2>/dev/null
}
domule "show dl" | fzf --delimiter ' ' --with-nth='2..' --prompt="select amule file(s) to cancel: " \
| cut -d ' ' -f1 | while read -r line; do domulecmd "cancel $line" ; done

@ -0,0 +1,40 @@
#!/usr/bin/env sh
# author: gotbletu (@youtube|github|odysee)
# https://www.youtube.com/user/gotbletu
# demo: https://youtu.be/IpHdH1mCUVc
helpmsg() {
cat <<EOF
desc: pause amule selected file downloads using fzf
depend: amule grep fzf coreutils
options:
-c, --config Use a different config
-h, --help Show help page
example:
${0##*/} -c ~/.aMule/amulecmd-server.conf
EOF
}
if [ $# -lt 1 ]; then
source ~/.aMule/amulecmd.conf
elif [ "$1" = -c ] || [ "$1" = --config ]; then
source "$2"
elif [ "$1" = -h ] || [ "$1" = --help ]; then
helpmsg
exit
fi
export FZF_DEFAULT_OPTS="--exact --ignore-case --no-sort --multi --tac --info=hidden --layout=reverse --scroll-off=5 --tiebreak=index --bind 'home:first,end:last,ctrl-p:half-page-up,ctrl-n:half-page-down,ctrl-b:page-up,ctrl-f:page-down,ctrl-h:first,ctrl-l:last' --header 'C-j/k/n/p/f/b/h/l:navigate Tab:mark/unmark Enter:select'"
domule() {
amulecmd --password "$amu_pass" --host "$amu_host" --port "$amu_port" --command "$@" 2>/dev/null | grep "^ >" | paste -d " " - - | grep "Downloading\|Waiting" | cut -d '>' -f2 | cut -c 2-
}
domulecmd() {
amulecmd --password "$amu_pass" --host "$amu_host" --port "$amu_port" --command "$@" 2>/dev/null
}
domule "show dl" | fzf --delimiter ' ' --with-nth='2..' --prompt="select amule file(s) to pause: " \
| cut -d ' ' -f1 | while read -r line; do domulecmd "pause $line" ; done

@ -0,0 +1,40 @@
#!/usr/bin/env sh
# author: gotbletu (@youtube|github|odysee)
# https://www.youtube.com/user/gotbletu
# demo: https://youtu.be/IpHdH1mCUVc
helpmsg() {
cat <<EOF
desc: resume amule selected file downloads using fzf
depend: amule grep fzf coreutils
options:
-c, --config Use a different config
-h, --help Show help page
example:
${0##*/} -c ~/.aMule/amulecmd-server.conf
EOF
}
if [ $# -lt 1 ]; then
source ~/.aMule/amulecmd.conf
elif [ "$1" = -c ] || [ "$1" = --config ]; then
source "$2"
elif [ "$1" = -h ] || [ "$1" = --help ]; then
helpmsg
exit
fi
export FZF_DEFAULT_OPTS="--exact --ignore-case --no-sort --multi --tac --info=hidden --layout=reverse --scroll-off=5 --tiebreak=index --bind 'home:first,end:last,ctrl-p:half-page-up,ctrl-n:half-page-down,ctrl-b:page-up,ctrl-f:page-down,ctrl-h:first,ctrl-l:last' --header 'C-j/k/n/p/f/b/h/l:navigate Tab:mark/unmark Enter:select'"
domule() {
amulecmd --password "$amu_pass" --host "$amu_host" --port "$amu_port" --command "$@" 2>/dev/null | grep "^ >" | paste -d " " - - | grep "Paused" | cut -d '>' -f2 | cut -c 2-
}
domulecmd() {
amulecmd --password "$amu_pass" --host "$amu_host" --port "$amu_port" --command "$@" 2>/dev/null
}
domule "show dl" | fzf --delimiter ' ' --with-nth='2..' --prompt="select amule file(s) to resume: " \
| cut -d ' ' -f1 | while read -r line; do domulecmd "resume $line" ; done

@ -0,0 +1,37 @@
#!/usr/bin/env sh
# author: gotbletu (@youtube|github|odysee)
# https://www.youtube.com/user/gotbletu
helpmsg() {
cat <<EOF
desc: set aMule download bandwidth speed limit (0 = unlimited)"
usage: ${0##*/} [speed in kB\\s]"
options:
-c, --config Use a different config
-h, --help Show help page
example:
${0##*/} 5000
${0##*/} 0
${0##*/} 2000 -c ~/.aMule/amulecmd-server.conf
EOF
}
if [ $# -lt 1 ]; then
helpmsg
exit
elif [ "$2" = -c ] || [ "$2" = --config ]; then
source "$3"
elif [ "$1" = -h ] || [ "$1" = --help ]; then
helpmsg
exit
else
source ~/.aMule/amulecmd.conf
fi
domule() { amulecmd --password "$amu_pass" --host "$amu_host" --port "$amu_port" --command "$@" 2>/dev/null | grep '^ >' ; }
domule "set bwlimit down $1"

@ -0,0 +1,37 @@
#!/usr/bin/env sh
# author: gotbletu (@youtube|github|odysee)
# https://www.youtube.com/user/gotbletu
helpmsg() {
cat <<EOF
desc: set aMule upload bandwidth speed limit (0 = unlimited)
usage: ${0##*/} [speed in kB\\s]"
options:
-c, --config Use a different config
-h, --help Show help page
example:
${0##*/} 4000
${0##*/} 0
${0##*/} 1000 -c ~/.aMule/amulecmd-server.conf
EOF
}
if [ $# -lt 1 ]; then
helpmsg
exit
elif [ "$2" = -c ] || [ "$2" = --config ]; then
source "$3"
elif [ "$1" = -h ] || [ "$1" = --help ]; then
helpmsg
exit
else
source ~/.aMule/amulecmd.conf
fi
domule() { amulecmd --password "$amu_pass" --host "$amu_host" --port "$amu_port" --command "$@" 2>/dev/null | grep '^ >' ; }
domule "set bwlimit up $1"

@ -0,0 +1,48 @@
#!/usr/bin/env sh
# author: gotbletu (@youtube|github|odysee)
# https://www.youtube.com/user/gotbletu
# demo: https://youtu.be/IpHdH1mCUVc
# reff: https://www.verot.net/amule_monitor.htm?lang=en-GB
# http://wiki.amule.org/wiki/Making_a_handy_amulecmd_script
# usage: $ amule-list
# $ watch -t amule-list
# $ viddy -t amule-list
helpmsg() {
cat <<EOF
desc: list amule status of download, paused, waiting and upload
depend: amule sed grep coreutils ncurses
options:
-c, --config Use a different config
-h, --help Show help page
example:
${0##*/} -c ~/.aMule/amulecmd-server.conf
EOF
}
if [ $# -lt 1 ]; then
source ~/.aMule/amulecmd.conf
elif [ "$1" = -c ] || [ "$1" = --config ]; then
source "$2"
elif [ "$1" = -h ] || [ "$1" = --help ]; then
helpmsg
exit
fi
domule() {
amulecmd --password "$amu_pass" --host "$amu_host" --port "$amu_port" --command "$@" 2>/dev/null | grep "^ >"
}
echo " > aMulecmd: Listens on [$amu_host:$amu_port]"
domule "status"
domule "get bwlimits" # show bandwidth limits
domule "statistics" | grep 'Shared Files:' | sed 's/ \+/ /g'
echo " > ===== Downloading =============="
domule "show dl" | cut -d' ' -f4- | sed -e 's/ \+/ /g' -e '1~2s/^/@ /' -e 's/\/ /\//g' -e '2~2s/-/ @ /g' -e '2~2s/^/ > /g' | tac | paste -d " " - - | grep "Downloading" | cut -d'@' -f1,2,5- | column -t -s'@' | cut -c-"$(tput cols)"
echo " > ===== InActive ================="
domule "show dl" | cut -d' ' -f4- | sed -e 's/ \+/ /g' -e '1~2s/^/@ /' -e 's/\/ /\//g' -e '2~2s/-/ @ /g' -e '2~2s/^/ > /g' | tac | paste -d " " - - | grep "Waiting\|Paused" | cut -d'@' -f1,2,5- | column -t -s'@' | cut -c-"$(tput cols)"
echo " > ===== Uploading ================"
domule "show ul" | sed -e 's/ \+/ /g' -e 's@http.*emule-project....@eMule@gi' -e 's@http.*aMule....@aMule@gi' -e 's@http.*adunanza....@AdunanzA@gi'

@ -0,0 +1,34 @@
#!/usr/bin/env sh
# author: gotbletu (@youtube|github|odysee)
# https://www.youtube.com/user/gotbletu
# usage: $ amule-log | tail -20
# $ watch -t "amule-log | tail -20"
# $ viddy -t "amule-log | tail -20"
helpmsg() {
cat <<EOF
desc: display amule logs
options:
-c, --config Use a different config
-h, --help Show help page
example:
${0##*/} -c ~/.aMule/amulecmd-server.conf
EOF
}
if [ $# -lt 1 ]; then
source ~/.aMule/amulecmd.conf
elif [ "$1" = -c ] || [ "$1" = --config ]; then
source "$2"
elif [ "$1" = -h ] || [ "$1" = --help ]; then
helpmsg
exit
fi
domule() {
amulecmd --password "$amu_pass" --host "$amu_host" --port "$amu_port" --command "$@" 2>/dev/null | grep '^ > [[:alnum:]]'
}
domule "show log" | grep -v -E 'New external connection accepted|Access granted.|External connection closed.|Connecting client: aMulecmd GIT'

@ -0,0 +1,31 @@
#!/usr/bin/env sh
# author: gotbletu (@youtube|github|odysee)
# https://www.youtube.com/user/gotbletu
helpmsg() {
cat <<EOF
desc: rescan amule shared directories
options:
-c, --config Use a different config
-h, --help Show help page
example:
${0##*/} -c ~/.aMule/amulecmd-server.conf
EOF
}
if [ $# -lt 1 ]; then
source ~/.aMule/amulecmd.conf
elif [ "$1" = -c ] || [ "$1" = --config ]; then
source "$2"
elif [ "$1" = -h ] || [ "$1" = --help ]; then
helpmsg
exit
fi
domule() {
amulecmd --password "$amu_pass" --host "$amu_host" --port "$amu_port" --command "$@" 2>/dev/null
}
domule "reload shared"

@ -0,0 +1,42 @@
#!/usr/bin/env sh
# author: gotbletu (@youtube|github|odysee)
# https://www.youtube.com/user/gotbletu
# demo: https://youtu.be/IpHdH1mCUVc
# depend: amule awk grep sed coreutils fzf
# usage: $ amule-results
# $ viddy -t amule-results
# $ while true; do amule-results | less ; done
# ^ to kill a infinite while loop, use ctrl-z to suspend, kill %1
helpmsg() {
cat <<EOF
desc: display amule search results, sort by highest (bottom-to-top)
options:
-c, --config Use a different config
-h, --help Show help page
example:
${0##*/} -c ~/.aMule/amulecmd-server.conf
EOF
}
if [ $# -lt 1 ]; then
source ~/.aMule/amulecmd.conf
elif [ "$1" = -c ] || [ "$1" = --config ]; then
source "$2"
elif [ "$1" = -h ] || [ "$1" = --help ]; then
helpmsg
exit
fi
domule() {
amulecmd --password "$amu_pass" --host "$amu_host" --port "$amu_port" --command "$@" 2>/dev/null
}
### Note: not possible to send two commands 'Results' and 'Download <Num>' in the same session
## sort by highest (bottom-to-top)
domule "results" | sed '1,4d' | head -2
domule "results" | sed -e '1,6d' -e '$d' | awk '{print $NF,$0}' | sort -n | cut -f2- -d' '
echo ""$(domule "results" | tail -1 | sed 's/^\ //g')" ---> Sorted by Highest Sources (bottom-to-top)"

@ -0,0 +1,43 @@
#!/usr/bin/env sh
# author: gotbletu (@youtube|github|odysee)
# https://www.youtube.com/user/gotbletu
# demo: https://youtu.be/IpHdH1mCUVc
# depend: amule awk grep sed coreutils fzf
# usage: $ amule-results
# $ viddy -t amule-results
# $ while true; do amule-results | less ; done
# ^ to kill a infinite while loop, use ctrl-z to suspend, kill %1
helpmsg() {
cat <<EOF
desc: display amule search results, sorted by highest sources (top-to-bottom)
options:
-c, --config Use a different config
-h, --help Show help page
example:
${0##*/} -c ~/.aMule/amulecmd-server.conf
EOF
}
if [ $# -lt 1 ]; then
source ~/.aMule/amulecmd.conf
elif [ "$1" = -c ] || [ "$1" = --config ]; then
source "$2"
elif [ "$1" = -h ] || [ "$1" = --help ]; then
helpmsg
exit
fi
domule() {
amulecmd --password "$amu_pass" --host "$amu_host" --port "$amu_port" --command "$@" 2>/dev/null
}
### Note: not possible to send two commands 'Results' and 'Download <Num>' in the same session
## sort by highest (top-to-bottom)
echo ""$(domule "results" | tail -1 | sed 's/^\ //g')" ---> Sorted by Highest Sources (top-to-bottom)"
domule "results" | sed '1,4d' | head -2
domule "results" | sed -e '1,6d' -e '$d' | awk '{print $NF,$0}' | sort -n | cut -f2- -d' ' | tac

@ -0,0 +1,42 @@
#!/usr/bin/env sh
# author: gotbletu (@youtube|github|odysee)
# https://www.youtube.com/user/gotbletu
# demo: https://youtu.be/IpHdH1mCUVc
# depend: amule awk grep sed coreutils fzf
# usage: $ amule-results
# $ viddy -t amule-results
# $ while true; do amule-results | less ; done
# ^ to kill a infinite while loop, use ctrl-z to suspend, kill %1
helpmsg() {
cat <<EOF
desc: display amule search results, sort by numbers (top-to-bottom)
depend: amule sed grep coreutils ncurses
options:
-c, --config Use a different config
-h, --help Show help page
example:
${0##*/} -c ~/.aMule/amulecmd-server.conf
EOF
}
if [ $# -lt 1 ]; then
source ~/.aMule/amulecmd.conf
elif [ "$1" = -c ] || [ "$1" = --config ]; then
source "$2"
elif [ "$1" = -h ] || [ "$1" = --help ]; then
helpmsg
exit
fi
domule() {
amulecmd --password "$amu_pass" --host "$amu_host" --port "$amu_port" --command "$@" 2>/dev/null
}
### Note: not possible to send two commands 'Results' and 'Download <Num>' in the same session
## sort by numbers (top-to-bottom)
domule "results" | sed '1,4d'

@ -0,0 +1,35 @@
#!/usr/bin/env sh
# author: gotbletu (@youtube|github|odysee)
# https://www.youtube.com/user/gotbletu
# demo: https://youtu.be/IpHdH1mCUVc
# usage: $ amule-servers
# $ viddy -t amule-servers
helpmsg() {
cat <<EOF
desc: display amule ed2k servers list
options:
-c, --config Use a different config
-h, --help Show help page
example:
${0##*/} -c ~/.aMule/amulecmd-server.conf
EOF
}
if [ $# -lt 1 ]; then
source ~/.aMule/amulecmd.conf
elif [ "$1" = -c ] || [ "$1" = --config ]; then
source "$2"
elif [ "$1" = -h ] || [ "$1" = --help ]; then
helpmsg
exit
fi
domule() {
amulecmd --password "$amu_pass" --host "$amu_host" --port "$amu_port" --command "$@" 2>/dev/null | grep "^ >"
}
domule "statistics" | grep 'Uptime\|Failed Servers\|Working Servers' | sed 's/ \+/ /g'
domule "show servers"

@ -0,0 +1,36 @@
#!/usr/bin/env sh
# author: gotbletu (@youtube|github|odysee)
# https://www.youtube.com/user/gotbletu
# depend: amule grep coreutils
# usage: $ amule-shared
# $ viddy -t amule-shared
# $ amule-shared | vim -R -c "set nowrap" -
# $ amule-shared | less
helpmsg() {
cat <<EOF
desc: list amule shared files
options:
-c, --config Use a different config
-h, --help Show help page
example:
${0##*/} -c ~/.aMule/amulecmd-server.conf
EOF
}
if [ $# -lt 1 ]; then
source ~/.aMule/amulecmd.conf
elif [ "$1" = -c ] || [ "$1" = --config ]; then
source "$2"
elif [ "$1" = -h ] || [ "$1" = --help ]; then
helpmsg
exit
fi
domule() {
amulecmd --password "$amu_pass" --host "$amu_host" --port "$amu_port" --command "$@" 2>/dev/null | grep '^ > [[:alnum:]]'
}
domule "show shared"

@ -0,0 +1,35 @@
#!/usr/bin/env sh
# author: gotbletu (@youtube|github|odysee)
# https://www.youtube.com/user/gotbletu
# demo: https://youtu.be/IpHdH1mCUVc
# usage: $ amule-statistics
# $ watch -t amule-statistics
# $ viddy -t amule-statistics
helpmsg() {
cat <<EOF
desc: display amule statistics
options:
-c, --config Use a different config
-h, --help Show help page
example:
${0##*/} -c ~/.aMule/amulecmd-server.conf
EOF
}
if [ $# -lt 1 ]; then
source ~/.aMule/amulecmd.conf
elif [ "$1" = -c ] || [ "$1" = --config ]; then
source "$2"
elif [ "$1" = -h ] || [ "$1" = --help ]; then
helpmsg
exit
fi
domule() {
amulecmd --password "$amu_pass" --host "$amu_host" --port "$amu_port" --command "$@" 2>/dev/null | grep "^ >"
}
domule "statistics"

@ -0,0 +1,32 @@
#!/usr/bin/env sh
# author: gotbletu (@youtube|github|odysee)
# https://www.youtube.com/user/gotbletu
# demo: https://youtu.be/IpHdH1mCUVc
helpmsg() {
cat <<EOF
desc: connect to amule text client
options:
-c, --config Use a different config
-h, --help Show help page
example:
${0##*/} -c ~/.aMule/amulecmd-server.conf
EOF
}
if [ $# -lt 1 ]; then
source ~/.aMule/amulecmd.conf
elif [ "$1" = -c ] || [ "$1" = --config ]; then
source "$2"
elif [ "$1" = -h ] || [ "$1" = --help ]; then
helpmsg
exit
fi
domule() {
amulecmd --password "$amu_pass" --host "$amu_host" --port "$amu_port" 2>/dev/null
}
domule

@ -0,0 +1,19 @@
### Amulecmd Commandline External Connection login ###
## save this config to ~/.aMule/amulecmd.conf
## required:
## amule > preferences > remote controls > [x] accept external connections
## amule > preferences > remote controls > password > [0123456789]
## $ amulecmd -h hostname -p ECport -P ECpassword -w
## $ amulecmd -h 192.168.1.xxx -p 4712 -P 0123456789 -w
## $ amulecmd -h localhost -p 4712 -P 0123456789 -w
# remote access password (ECPassword)
amu_pass=0123456789
# remote access ip address
# amu_host=192.168.1.131
amu_host=localhost
# remote access port (ECPort)
amu_port=4712
Loading…
Cancel
Save