LinuxQuestions.org
Help answer threads with 0 replies.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 06-18-2004, 08:23 PM   #1
Adony
Member
 
Registered: Apr 2004
Location: Portugal
Distribution: Gentoo 2004.2 - working on LFS 6
Posts: 126

Rep: Reputation: 15
Script to start/shut down amule not working


Hi there!!

I trying to make amule to start at 1am and to turn off at 7pm

To do that i think of using crontab to make it start and thats ok but as far as i know later there's no way of stopping it.
So i made a start script to start amule and also to store its pid so that later i can kill/stop it when the proper hour comes.
I tested the script and it worked fine when i ran it manually but when inserted in the crontab it doesn't fire up amule...

There are the scripts (dont laught at it ... is the first i've done )

startup script

#!/bin/sh
hm=/home/miguel

amule & mulepid=$!
echo $mulepid > $hm/.aMule/id
# to know what pid is
echo id is $mulepid


end scipt
#!/bin/sh
hm=/home/miguel/

#reads the amule current id; previously set by the start script
read NAME < $hm/.aMule/id
echo id is $NAME
#kills amule
kill $NAME

The problem seems to be with the start script because amule doesnt start when schedulled by the crontab but runs fine when i start it manually (as said above)

I've chmod +x to the scripts and put it in /usr/local/bin and named it str and end
so they are "seen" by crontab right??

There's the way i'm invoking it within crontab

00 01 * * * str
00 07 * * * end

I'm missing something but i cant figure out what...
What maybe the problem?
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
aMule does not start martincho Slackware 7 11-14-2005 10:16 AM
Automatic start of aMule underberg Linux - Software 4 03-13-2005 09:12 AM
Start up and shut down problem with Gentoo bigjohn Linux - General 4 11-18-2004 07:22 AM
help!...suse 9 gome won't shut off...or start reillac Linux - Newbie 14 01-03-2004 04:17 PM
Internet not working after shut down bwpro Linux - Networking 5 08-20-2003 09:00 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 03:15 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration