Anope IRC Services

Please login or register.

Login with username, password and session length
Advanced search  

News:

Pages: [1]   Go Down

Author Topic: Setting up a crontab Need Help  (Read 16406 times)

0 Members and 1 Guest are viewing this topic.

Hassankhalid

  • Guest
Setting up a crontab Need Help
« on: December 22, 2006, 06:17:57 PM »

First rename the example.chk script that is in Anope path (by default,
    this is ~/services) to services.chk and edit it. You'll need to modify
    the CONFIGURATION part of the file. Then ensure that the file is marked
    as executable by typing chmod +x services.chk, and try to launch the
    script to see if it works (Anope must not be running when you do this ;))

    When this is done, you'll have to add the crontab entry. Type crontab -e.
    This will open the default text editor with the crontab file. Enter the
    following (with correct path):

        */5 * * * * /home/ircd/services/services.chk >/dev/null 2>&1

    The */5 at the beginning means "check every 5 minutes". You may replace
    the 5 with other another number if you want (but less than 60). Consult
    your system's manual pages for more details on the syntax of the crontab
    file. Interesting manpages are crontab(5), crontab(1) and cron(8).

    Save and exit, and it's installed.


dont  understand anything  can anyone explain mean more specially this part

First rename the example.chk script that is in Anope path (by default,
    this is ~/services) to services.chk and edit it. You'll need to modify
    the CONFIGURATION part of the file. Then ensure that the file is marked
    as executable by typing chmod +x services.chk, and try to launch the
    script to see if it works (Anope must not be running when you do this ;))

    When this is done

thanks help me wana set please
Logged

owine

  • Anope User
  • Offline Offline
  • Posts: 130
(No subject)
« Reply #1 on: December 22, 2006, 07:23:39 PM »

what is it you are having trouble with... ? you must edit the example.chk file so it points to your paths and not the default ones. then, save it as services.chk. next, type the command "crontab -e" and paste " */5 * * * * /home/path/to/services/services.chk >/dev/null 2>&1" where path/to is the path to your services folder. save that and it will be in the crontab to run every 5 minutes and check if anope is running. it will restart it if it is not.
Logged

Hassankhalid

  • Guest
(No subject)
« Reply #2 on: December 22, 2006, 08:42:31 PM »

# Anope binary directory
ANOPATH=/home/ircd/services/

# Name of the pid file
ANOPIDF=services.pid

# Name of the executable
ANOPROG=services

# Parameters to pass to the executable
ANOARGS=""
#ANOARGS="-debug"

what  changes i need edit here????
Logged

owine

  • Anope User
  • Offline Offline
  • Posts: 130
(No subject)
« Reply #3 on: December 23, 2006, 02:30:40 AM »

# Anope binary directory
ANOPATH=/home/ircd/services/

change that to the path to your services folder
Logged

Hassankhalid

  • Guest
(No subject)
« Reply #4 on: December 23, 2006, 05:23:22 AM »

[Name@Name ~]$ ls
anope-1.7.17       NeoStats                SecureServ-1.3.tar.gz
anope-1.7.17.tar   NeoStats-2.5.21         services
domains            NeoStats-2.5.21.tar.gz  StupidServ-1.3
hideserver.tar.gz  opers.tar               StupidServ-1.3.tar.gz
hideserver.txt     OPSB-2.5                Unreal3.2
imap               OPSB-2.5.tar.gz         Unreal3.2.5.tar
mail               public_html             WarServ-1.0
mbox               SecureServ-1.3          WarServ-1.0.tar.gz

i have this all in my ircd shell how i can check path its like

# Anope binary directory
ANOPATH=/home/services/<<  this is  rite for me?
Logged

owine

  • Anope User
  • Offline Offline
  • Posts: 130
(No subject)
« Reply #5 on: December 23, 2006, 05:29:03 AM »

it would be /home/username/services. you have to replace username with your username.
Logged

Hassankhalid

  • Guest
(No subject)
« Reply #6 on: December 23, 2006, 02:17:23 PM »

yeh thx what abt this  line  below

Then ensure that the file is marked
as executable by typing chmod +x services.chk, and try to launch the
script to see if it works (Anope must not be running when you do this )

When this is done

can you explain more  jus for test i dont need do it????
Logged

owine

  • Anope User
  • Offline Offline
  • Posts: 130
(No subject)
« Reply #7 on: December 23, 2006, 05:38:55 PM »

you have to make sure the script can be executed. so in the directory type "chmod +x services.chk" and it will be.
Logged

Hassankhalid

  • Guest
(No subject)
« Reply #8 on: December 23, 2006, 06:32:23 PM »

directory type "chmod +x services.chk"

look  i edit that file and rename services.chk in services folder than where i need put this command u mention above login into shell and give this? chmod +x services.chk???
Logged

owine

  • Anope User
  • Offline Offline
  • Posts: 130
(No subject)
« Reply #9 on: December 24, 2006, 05:40:54 PM »

login to your shell. cd to the directory that services.chk is in. then type that chmod command into the shell.
Logged

Hassankhalid

  • Guest
(No subject)
« Reply #10 on: December 24, 2006, 08:00:01 PM »

: bad interpreter: No such file or directorychk: /bin/sh

error

i did login into shell than  cd services there  example.chk file i did  edit and than kill services pid than add crontab and am geeting error i paste  above  anope1.7.17 folder have as well example.chk file in data folder i need edit both of them or what?
Logged

Hassankhalid

  • Guest
(No subject)
« Reply #11 on: December 25, 2006, 09:47:07 AM »

help me  pleaseeeeeeeee;(
Logged

owine

  • Anope User
  • Offline Offline
  • Posts: 130
(No subject)
« Reply #12 on: December 25, 2006, 06:24:02 PM »

what did you paste in your crontab?
Logged

Hassankhalid

  • Guest
(No subject)
« Reply #13 on: December 25, 2006, 09:34:54 PM »

*/5 * * * * /home/hassan1/ircd2/services/services.chk >/dev/null 2>&1
Logged

owine

  • Anope User
  • Offline Offline
  • Posts: 130
(No subject)
« Reply #14 on: December 25, 2006, 09:59:39 PM »

and what is the path in you pasted into services.chk?
Logged

Hassankhalid

  • Guest
(No subject)
« Reply #15 on: December 26, 2006, 06:17:10 AM »

# Anope binary directory
ANOPATH=/home/hassan1/ircd2/services/
Logged

owine

  • Anope User
  • Offline Offline
  • Posts: 130
(No subject)
« Reply #16 on: December 26, 2006, 07:58:55 PM »

ok. those look correct. now if you are in the services directory, and you do ./services.chk, paste the exact error you get.
Logged

Hassankhalid

  • Guest
(No subject)
« Reply #17 on: December 27, 2006, 12:15:30 PM »

Name@Name:~/ircd2/services$ ./services.chk
: bad interpreter: No such file or directory
Logged

owine

  • Anope User
  • Offline Offline
  • Posts: 130
(No subject)
« Reply #18 on: December 27, 2006, 07:32:47 PM »

ok, is the services.chk file in a different folder?
Logged

Hassankhalid

  • Guest
(No subject)
« Reply #19 on: December 28, 2006, 06:39:15 AM »

well file is in services folder  but am confuced i need change that file in anope1.7.17 folder as well???
Logged

owine

  • Anope User
  • Offline Offline
  • Posts: 130
(No subject)
« Reply #20 on: December 28, 2006, 07:51:46 AM »

it sounds as if you have some directories mixed up in which case i cannot help.
Logged

Hassankhalid

  • Guest
(No subject)
« Reply #21 on: December 28, 2006, 01:07:59 PM »

man when u install anope there 2 folder anope1.7.17 and other services and  both folders have these files got???
Logged

Jan Milants

  • Team
  • *
  • Offline Offline
  • Gender: Male
  • Posts: 1372
(No subject)
« Reply #22 on: December 29, 2006, 03:27:52 PM »

actually it doesn't really matter where you put it, as long as the dir in the crontab and the config of the .chk are correctly given..
but to answer your question normally you only have to edit the one in services/
Logged
If you like me donate coins to 1FBmZVT4J8WAUMHKqpWhgNVj3XXnRN1cCk :)
Pages: [1]   Go Up