|
|
|
![]() |
|
Strumenti |
![]() |
#1 |
Senior Member
Iscritto dal: Mar 2002
Città: (MI)
Messaggi: 1111
|
[aMule] init.d script per amuled
Mi date una mano a fare uno script da mettere in /etc/init.d per usare il demone di amule?
Quello che segue è una versione spolpata e modificata dello script presente nel wiki di amule.org per far partire amule con VNC. amuled.sh Codice:
#!/bin/sh # # Startup/Stop script for aMuled - aMule Daemon # #Here, the choosen user to run amuled theUser= case "$1" in 'start') /bin/su - $theUser -c "PATH=/usr/local/bin:/usr/bin:/bin /usr/bin/amuled" ;; 'stop') ;; *) echo "Usage: /etc/init.d/amuled.sh { start | stop }" ;; esac - controllo da mettere nello "start" che verifica che amuled non sia già in esecuzione. - stop - restart
__________________
Perchè usare Formati Aperti? - Powered by: Ubuntu Hardy - FSFE Fellow 615 GUIDA : Shop Online AFFIDABILI! Ecco DOVE comprare! IOLAIR Monitor TFT 24'' Wide MB24W (6 ms) |
![]() |
![]() |
![]() |
#2 |
Senior Member
Iscritto dal: Mar 2002
Città: (MI)
Messaggi: 1111
|
Cosa ne dite di killall per lo stop?
/bin/su - $theUser -c "PATH=/usr/local/bin:/usr/bin:/bin /usr/bin/killall amuled" amuled.sh Codice:
#!/bin/sh # # Startup/Stop script for aMuled - aMule Daemon # #Here, the choosen user to run amuled theUser= case "$1" in 'start') /bin/su - $theUser -c "PATH=/usr/local/bin:/usr/bin:/bin /usr/bin/amuled" ;; 'stop') /bin/su - $theUser -c "PATH=/usr/local/bin:/usr/bin:/bin /usr/bin/killall amuled" ;; *) echo "Usage: /etc/init.d/amuled.sh { start | stop }" ;; esac
__________________
Perchè usare Formati Aperti? - Powered by: Ubuntu Hardy - FSFE Fellow 615 GUIDA : Shop Online AFFIDABILI! Ecco DOVE comprare! IOLAIR Monitor TFT 24'' Wide MB24W (6 ms) |
![]() |
![]() |
![]() |
#3 |
Senior Member
Iscritto dal: Feb 2004
Messaggi: 1209
|
bah se amuled nn ha un comando specifico per stopparlo allora va bene..
Pr il controllo x vedere se e' partito ti basta un semplice pippo='ps aux|grep /usr/bin/amuled' (non con qesti apici pero') e poi fai il controllo x vedere se la variabile contieneun valore oppure no
__________________
...Ordunque... |
![]() |
![]() |
![]() |
#4 |
Senior Member
Iscritto dal: Mar 2002
Città: (MI)
Messaggi: 1111
|
amuled potrebbe essere eseguito da più utenti.
Codice:
alreadyRunning=`/bin/ps -U $theUser -u $theUser u|grep /usr/bin/amuled` if [ -n ${alreadyRunning} ]; then echo "amuled already running"; else /bin/su - $theUser -c "PATH=/usr/local/bin:/usr/bin:/bin /usr/bin/amuled" fi
__________________
Perchè usare Formati Aperti? - Powered by: Ubuntu Hardy - FSFE Fellow 615 GUIDA : Shop Online AFFIDABILI! Ecco DOVE comprare! IOLAIR Monitor TFT 24'' Wide MB24W (6 ms) |
![]() |
![]() |
![]() |
#5 |
Senior Member
Iscritto dal: Mar 2002
Città: (MI)
Messaggi: 1111
|
Codice:
#!/bin/sh # # Startup/Stop script for aMuled - aMule Daemon # #Here, the choosen user to run amuled theUser= case "$1" in 'start') alreadyRunning=`/bin/ps -U ${theUser} -u ${theUser} u|grep amuled` if [ ${alreadyRunning} > " " ] then echo "amuled already running" else /bin/su - ${theUser} -c "PATH=/usr/local/bin:/usr/bin:/bin /usr/bin/amuled -f" fi ;; 'stop') /bin/su - ${theUser} -c "PATH=/usr/local/bin:/usr/bin:/bin /usr/bin/killall amuled" ;; *) echo "Usage: /etc/init.d/amuled.sh { start | stop }" ;; esac Il controllo per vedere se è già in esecuzione è inutile, ci pensa già amuled. l'opzione -f è per metterlo in background. Codice:
#!/bin/sh # # Startup/Stop script for aMuled - aMule Daemon # #Here, the choosen user to run amuled theUser= case "$1" in 'start') /bin/su - ${theUser} -c "PATH=/usr/local/bin:/usr/bin:/bin /usr/bin/amuled -f" ;; 'stop') /bin/su - ${theUser} -c "PATH=/usr/local/bin:/usr/bin:/bin /usr/bin/killall amuled" ;; *) echo "Usage: /etc/init.d/amuled.sh { start | stop }" ;; esac
__________________
Perchè usare Formati Aperti? - Powered by: Ubuntu Hardy - FSFE Fellow 615 GUIDA : Shop Online AFFIDABILI! Ecco DOVE comprare! IOLAIR Monitor TFT 24'' Wide MB24W (6 ms) Ultima modifica di Mezzelfo : 07-06-2005 alle 18:16. |
![]() |
![]() |
![]() |
#6 |
Senior Member
Iscritto dal: Mar 2002
Città: (MI)
Messaggi: 1111
|
E' necessario installare amule-utils per avere amulecmd.
(# = comandi da root, $ comandi da utente che userà amule) # apt-get install amuled amule-utils amule-remote-gui $ amuled (questo genera il file amule.conf) $ vi ~/.aMule/amule.conf controllare che ci siano queste voci: Codice:
[ExternalConnect] AcceptExternalConnections=1 ECUseTCPPort=1 ECPort=4712 ECPassword= DlgTabsOnTop=0 UseSecIdent=1 IpFilterOn=1 UseSrcSeeds=1 ShowProgressBar=1 ShowPercent=0 ExtractMetaDataTags=0 FullChunkAlloc=0 FullPartAlloc=0 # vi /etc/init.d/amuled.sh incollarci questo: Codice:
#!/bin/sh # # Startup/Stop script for aMuled - aMule Daemon # #Here, the choosen user to run amuled theUser= case "$1" in 'start') /bin/su - ${theUser} -c "PATH=/usr/local/bin:/usr/bin:/bin /usr/bin/amuled -f" ;; 'stop') /bin/su - ${theUser} -c "PATH=/usr/local/bin:/usr/bin:/bin /usr/bin/amulecmd -c Shutdown" ;; *) echo "Usage: /etc/init.d/amuled.sh { start | stop }" ;; esac # update-rc.d amuled.sh defaults (in questo modo amuled verrà lanciato automaticamente ad ogni avvio del sistema e verrà terminato in caso di riavvio o spegnimento) Per rimuovere lo script dall'avvio automatico: # update-rc.d -f amuled.sh remove Per utilizzare aMule "normalmente" con la GUI: $ amulegui
__________________
Perchè usare Formati Aperti? - Powered by: Ubuntu Hardy - FSFE Fellow 615 GUIDA : Shop Online AFFIDABILI! Ecco DOVE comprare! IOLAIR Monitor TFT 24'' Wide MB24W (6 ms) Ultima modifica di Mezzelfo : 07-06-2005 alle 20:50. |
![]() |
![]() |
![]() |
#7 |
Senior Member
Iscritto dal: Oct 2004
Città: Rovereto (tn)
Messaggi: 2187
|
Va bene per qualsiasi versione di Amule?
|
![]() |
![]() |
![]() |
#8 |
Senior Member
Iscritto dal: Apr 2003
Città: Genova
Messaggi: 673
|
già che ci sono vado un po off topic.
Qualcuno usa emule con fastweb? se si come ha risolto il problema che non ci sono piu' server e tutto gira sulla rete KADU. A quando uno svilluppo della rete kad per a-mule ? Ciao e scusate l'ot ![]() |
![]() |
![]() |
![]() |
#9 | |
Senior Member
Iscritto dal: Oct 2004
Città: Rovereto (tn)
Messaggi: 2187
|
Quote:
per l'implementazione kad a breve nella versione 2.10 mi sembra.. cmq guarda su amule.org |
|
![]() |
![]() |
![]() |
#10 | |
Senior Member
Iscritto dal: Dec 2000
Città: Milano
Messaggi: 2089
|
Quote:
![]()
__________________
![]() |
|
![]() |
![]() |
![]() |
#11 | |
Senior Member
Iscritto dal: Apr 2003
Città: Genova
Messaggi: 673
|
Quote:
Ultima modifica di LimiT-MaTz : 25-07-2005 alle 20:33. |
|
![]() |
![]() |
![]() |
#13 |
Senior Member
Iscritto dal: Oct 2004
Città: Rovereto (tn)
Messaggi: 2187
|
ho letto sia qua che sul forum di amule.org (l'autore dei post è lo stesso, o almeno credo)
cmq: 1) amulegui non c'è + 2) quando do amuled questo è l'output Codice:
bako@PC-FISSO-DEBIAN:~$ amuled amuled: OnInit - starting timer Initialising aMule Checking if there is an instance already running... Host: amule.sourceforge.net:80 URL: http://amule.sourceforge.net/lastversion Response: 200 (Error: 0) Download size: 6 HTTP download thread end Loading temp files from /mnt/d/emule/Temp. Loading PartFile 5 of 5 All PartFiles Loaded. ListenSocket: Ok. External connections disabled due to empty password! *** Server UDP socket (TCP+3) at 0.0.0.0:4665 *** TCP socket (TCP) listening on 0.0.0.0:4662 *** Client UDP socket (extended eMule) at 0.0.0.0:4672 Adding file /mnt/d/emule/Temp/001.part.met to shares Adding file /mnt/d/emule/Temp/002.part.met to shares Adding file /mnt/d/emule/Temp/006.part.met to shares Adding file /mnt/d/emule/Temp/007.part.met to shares Adding file /mnt/d/emule/Temp/009.part.met to shares HTTP download thread end Servers: Trying to connect General: CamuleDaemonApp::OnRun() ERROR: aMule daemon cannot be used when external connections are disabled. To enable External Connections, use either a normal aMule or set the key"AcceptExternalConnections" to 1 in the file ~/.aMule/amule.conf Now, exiting main app... aMule shutdown: Terminating core. Saving PartFile 5 of 5 All PartFiles Saved. aMule shutdown completed. |
![]() |
![]() |
![]() |
#14 |
Senior Member
Iscritto dal: Oct 2004
Città: Rovereto (tn)
Messaggi: 2187
|
sistemato solo che ora ho 2 problemi:
1) non c'è più amulegui e anche con apt non esiste 2) lo scrpit fa partire amuled come root (e con tutte le sue impostazioni), mentre a me sereve che lo faccia partire come il mio user |
![]() |
![]() |
![]() |
Strumenti | |
|
|
Tutti gli orari sono GMT +1. Ora sono le: 18:29.