Difference between revisions of "AMuleWeb"
(→aMuled and aMuleWeb as services) |
|||
(23 intermediate revisions by 18 users not shown) | |||
Line 1: | Line 1: | ||
− | + | <center>'''English''' | [[AMuleWeb-de|Deutsch]] | [[AMuleWeb-it|Italiano]] </center> | |
− | + | '''aMuleWeb''' is a utility that allows you to control aMule by means of a web browser from any location. The web interface offers a subset of aMule functionality, including searching for files, initializing downloads, and viewing your download queue. It also displays status information and allows you to change certain options. | |
− | + | aMule itself doesn't support [http://www.w3.org/MarkUp HTTP] connections; aMuleWeb, which does, therefore serves as an intermediary between aMule and a web browser. Once the link between aMuleWeb and a remote user is established, it connects to aMule via the [[External Connections]] interface. | |
− | + | By default, aMuleWeb listens for HTTP connections at port 4711, but this can be changed in [[Usage Preferences|Preferences]]'. | |
− | + | == Set a password == | |
− | + | To connect to the web server a password must be set, otherwise connection is refused. To set a password run aMuleWeb with --admin-pass=your_password. | |
− | == | + | == Standard ports == |
− | + | The ports can be set to anything, but by default aMule uses: | |
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | : | + | |
− | * | + | *External Connections: 4712 |
− | + | *amuleweb: 4711 | |
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | * | + | |
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | Make sure you do not confuse the two; in the default configuration, it looks like this: | |
− | + | aMule --> <nowiki>[</nowiki>4712<nowiki>]</nowiki> --> aMuleWeb --> <nowiki>[</nowiki>4711<nowiki>]</nowiki> --> web browser | |
− | + | == Template (skin) location == | |
− | + | aMuleWeb looks for its files in a number of places: | |
− | + | *In your home directory: ''$HOME/.aMule/webserver/''<nowiki>[</nowiki>skin name<nowiki>]</nowiki>''/'' | |
− | + | *And at its install location, in this order (by default, ''/usr/local/share/amule/webserver'' if you compiled aMule, or ''/usr/share/amule/webserver'' if you installed it from a package). | |
− | + | Default template name is 'default'. | |
− | + | If, ''after installing'' aMule, aMuleWeb refuses to run because of not being able to load template: | |
− | + | *Please report this situation to us, and then | |
− | '' | + | *Create the directories ''webserver/default'' in the ''.aMule'' subdirectory of your home directory, and copy the contents of the ''src/webserver'' directory there from the aMule tarball (ie, ''$HOME/.aMule/webserver/default''). |
− | + | == aMuled and aMuleWeb as services == | |
− | + | Although starting aMuleWeb by enabling it in aMule's preferences is the preferred method, you can also run aMuleWeb together with aMuled as as services by means of an init.d script. Here is an example: | |
− | + | ''/etc/init.d/amule'' | |
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
PATH=/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin | PATH=/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin | ||
Line 91: | Line 50: | ||
DESC=amuled | DESC=amuled | ||
RUNAMULE=no | RUNAMULE=no | ||
+ | USER=youramuleuser | ||
test -x $DAEMON || exit 0 | test -x $DAEMON || exit 0 | ||
# Include amule defaults if available | # Include amule defaults if available | ||
− | if [ -f /etc/default/amule ] ; then | + | if <nowiki>[</nowiki> -f /etc/default/amule <nowiki>]</nowiki> ; then |
. /etc/default/amule | . /etc/default/amule | ||
fi | fi | ||
− | + | ||
− | if [ "$RUNAMULE" != "yes" ];then | + | if <nowiki>[</nowiki> "$RUNAMULE" != "yes" <nowiki>]</nowiki> ; then |
echo "Amule not to be started. Edit /etc/default/amule first." | echo "Amule not to be started. Edit /etc/default/amule first." | ||
exit 1 | exit 1 | ||
Line 109: | Line 69: | ||
start) | start) | ||
echo -n "Starting $DESC: " | echo -n "Starting $DESC: " | ||
− | su | + | su $USER -c "$DAEMON -f" |
− | su | + | while ! netstat -l -n -p -t | grep -q amuled ; do sleep 1 ; done |
+ | su $USER -c "$WEB --quiet &" | ||
echo "$NAME." | echo "$NAME." | ||
;; | ;; | ||
Line 124: | Line 85: | ||
killall --quiet --ignore-case $DAEMON | killall --quiet --ignore-case $DAEMON | ||
sleep 1 | sleep 1 | ||
− | su | + | su $USER -c "$DAEMON -f" |
− | su | + | while ! netstat -l -n -p -t | grep -q amuled ; do sleep 1 ; done |
+ | su $USER -c "$WEB --quiet &" | ||
echo "$NAME." | echo "$NAME." | ||
;; | ;; | ||
*) | *) | ||
N=/etc/init.d/$NAME | N=/etc/init.d/$NAME | ||
− | echo "Usage: $N {start|stop|restart|force-reload}" | + | echo "Usage: $N {start|stop|restart|force-reload}" >&2 |
exit 1 | exit 1 | ||
;; | ;; | ||
Line 137: | Line 99: | ||
exit 0 | exit 0 | ||
− | |||
− | |||
− | Then, for the | + | Then just set that script to be run at start up. On [[Debian]] this would be done with the following command: |
+ | |||
+ | update-rc.d amule defaults | ||
+ | |||
+ | Then, for the daemons to start you just have to create a file ''/etc/default/amule'' which contains a single line: | ||
RUNAMULE=yes | RUNAMULE=yes | ||
− | + | ||
+ | === Ubuntu === | ||
+ | |||
+ | Ubuntu has a script in /etc/init.d already called amule-daemon | ||
+ | |||
+ | You need to set the user by editing /etc/default/amule-daemon, and amuled will be started as that user. | ||
== Where to report problems and questions? == | == Where to report problems and questions? == |
Latest revision as of 00:49, 1 August 2009
aMuleWeb is a utility that allows you to control aMule by means of a web browser from any location. The web interface offers a subset of aMule functionality, including searching for files, initializing downloads, and viewing your download queue. It also displays status information and allows you to change certain options.
aMule itself doesn't support HTTP connections; aMuleWeb, which does, therefore serves as an intermediary between aMule and a web browser. Once the link between aMuleWeb and a remote user is established, it connects to aMule via the External Connections interface.
By default, aMuleWeb listens for HTTP connections at port 4711, but this can be changed in Preferences'.
Contents
Set a password
To connect to the web server a password must be set, otherwise connection is refused. To set a password run aMuleWeb with --admin-pass=your_password.
Standard ports
The ports can be set to anything, but by default aMule uses:
- External Connections: 4712
- amuleweb: 4711
Make sure you do not confuse the two; in the default configuration, it looks like this:
aMule --> [4712] --> aMuleWeb --> [4711] --> web browser
Template (skin) location
aMuleWeb looks for its files in a number of places:
- In your home directory: $HOME/.aMule/webserver/[skin name]/
- And at its install location, in this order (by default, /usr/local/share/amule/webserver if you compiled aMule, or /usr/share/amule/webserver if you installed it from a package).
Default template name is 'default'.
If, after installing aMule, aMuleWeb refuses to run because of not being able to load template:
- Please report this situation to us, and then
- Create the directories webserver/default in the .aMule subdirectory of your home directory, and copy the contents of the src/webserver directory there from the aMule tarball (ie, $HOME/.aMule/webserver/default).
aMuled and aMuleWeb as services
Although starting aMuleWeb by enabling it in aMule's preferences is the preferred method, you can also run aMuleWeb together with aMuled as as services by means of an init.d script. Here is an example:
/etc/init.d/amule
PATH=/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin DAEMON=/usr/bin/amuled WEB=/usr/bin/amuleweb NAME=amuled DESC=amuled RUNAMULE=no USER=youramuleuser test -x $DAEMON || exit 0 # Include amule defaults if available if [ -f /etc/default/amule ] ; then . /etc/default/amule fi if [ "$RUNAMULE" != "yes" ] ; then echo "Amule not to be started. Edit /etc/default/amule first." exit 1 fi set -e case "$1" in start) echo -n "Starting $DESC: " su $USER -c "$DAEMON -f" while ! netstat -l -n -p -t | grep -q amuled ; do sleep 1 ; done su $USER -c "$WEB --quiet &" echo "$NAME." ;; stop) echo -n "Stopping $DESC: " killall --quiet --ignore-case $WEB killall --quiet --ignore-case $DAEMON echo "$NAME." ;; restart|force-reload) echo -n "Restarting $DESC: " killall --quiet --ignore-case $WEB killall --quiet --ignore-case $DAEMON sleep 1 su $USER -c "$DAEMON -f" while ! netstat -l -n -p -t | grep -q amuled ; do sleep 1 ; done su $USER -c "$WEB --quiet &" echo "$NAME." ;; *) N=/etc/init.d/$NAME echo "Usage: $N {start|stop|restart|force-reload}" >&2 exit 1 ;; esac exit 0
Then just set that script to be run at start up. On Debian this would be done with the following command:
update-rc.d amule defaults
Then, for the daemons to start you just have to create a file /etc/default/amule which contains a single line:
RUNAMULE=yes
Ubuntu
Ubuntu has a script in /etc/init.d already called amule-daemon
You need to set the user by editing /etc/default/amule-daemon, and amuled will be started as that user.
Where to report problems and questions?
For Problems or Questions just report on http://forum.amule.org forum or join IRC channel #amule at irc.freenode.net
Other sources of information
Read the aMuleWeb man page, which is available in English, French, German, Hungarian and Spanish.
For further information read the aMuleWeb FAQ.