aMule Forum

Please login or register.

Login with username, password and session length
Advanced search  

News:

We're back! (IN POG FORM)

Author Topic: How to start amule in a shell script on MacOSX ?  (Read 1430 times)

mikool19

  • Approved Newbie
  • *
  • Karma: 0
  • Offline Offline
  • Posts: 7
How to start amule in a shell script on MacOSX ?
« on: November 22, 2006, 10:35:13 PM »

Hi,
i have posted a similar question on another forum without answer, so i try here.

What are the commands supported by amule to start it in a shell script (in tcsh for me) ?
The "amule -h" gives very low information on it and no "man amule" available...
I think that a similar script running on linux or any "UNIX like" should work on MacOSX.

A very simple command as "/.../.../.../amule&" runs very well directly in a terminal but doesn't work in a shelll script called by cron. Why ???

Thanks to anyone can give an idea or an answer.
Logged

mikool19

  • Approved Newbie
  • *
  • Karma: 0
  • Offline Offline
  • Posts: 7
RE: How to start amule in a shell script on MacOSX ?
« Reply #1 on: November 22, 2006, 11:15:13 PM »

The solution is to not use crontab but a script in a loop with a while command like that :
Code: [Select]
#!/bin/tcsh -f

while (1)
set aMule_state = "`ps -awwx | grep "aMule.app/Contents/MacOS/amule" | grep -v grep`"
if ("$aMule_state" == "") then
/Users/gd/Applications/P2P/aMule.app/Contents/MacOS/amule --i-would-marry-my-mule &
endif
sleep 60
end
Here i use the last CVS aMule with the option --i-would-marry-my-mule but this version crashes also with crontab and not with the while command. I just have to make this script workable with Terminal (Command-I) and to put it in Startup for automatic startup.

I have found a workaround but not why aMule crashes and not why it's not working with crontab. So, i'm always interested by answers.

PS : sorry to duplicate this message  :]
Logged