Anope IRC Services

Please login or register.

Login with username, password and session length
Advanced search  

News:

Pages: [1]   Go Down

Author Topic: services.pid is not being created  (Read 4675 times)

0 Members and 1 Guest are viewing this topic.

czar

  • Anope User
  • Offline Offline
  • Posts: 5
    • @czarphanguye
services.pid is not being created
« on: December 05, 2009, 04:19:10 PM »

Perhaps someone could explain what is going wrong in this set-up and why isn't services creating a pid file?  I'm trying to ensure anope runs on reboot and that it restarts if the service isn't running. 

What happens is the service does run on crontab but the pid is never created.  So every 2 minutes services tries to reconnect and I get "11:08 !irc.example.com *** Permanent Global Q:line added for OperServ on Sat Dec  5 16:08:29 && 2009 GMT (from services.example.com: Reserved for services)" until I manually create the pid via ps aux|grep services && echo 25700 >> ~/bin/anope/bin/services.pid.  As soon as I create that file the service quits trying to reconnect and everything is fine (until reboot.)

Code: [Select]
czar@kremlin:~/bin/anope/data/backups$ crontab -l
# m h  dom mon dow   command
*/2 * * * * /home/czar/bin/Unreal3.2/ircdcron/ircdchk >/dev/null 2>&1
*/2 * * * * /home/czar/bin/anope/data/services.chk >/dev/null 2>&1

Code: [Select]
czar@kremlin:~/bin/anope/data/backups$ cat /home/czar/bin/anope/data/services.chk
#!/bin/sh

# Crontab script for Anope
#
# To know how to install the crontab, read the INSTALL file.

###############################################################
# CONFIGURATION
###############################################################

# Anope binary directory
ANOPATH=/home/czar/bin/anope/bin

# Name of the pid file
ANOPIDF=services.pid

# Name of the executable
ANOPROG=services

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

###############################################################
#                 DON'T EDIT ANYTHING BELOW                   #
###############################################################

PATH=/bin:/usr/bin:/usr/local/bin

ANOPID=

cd $ANOPATH

if [ -f $ANOPIDF ]
then
        ANOPID=`cat $ANOPIDF`
        if [ `ps auwx | grep $ANOPROG | grep $ANOPID | grep -v -c grep` = 1 ]
        then
                exit
        fi
        rm -f $ANOPIDF
fi

./$ANOPROG $ANOARGS


« Last Edit: December 05, 2009, 04:22:20 PM by czar »
Logged

Naram Qashat

  • Team
  • *
  • Offline Offline
  • Gender: Male
  • Posts: 192
    • CBX's Sprite Animations
Re: services.pid is not being created
« Reply #1 on: December 05, 2009, 04:23:01 PM »

Hmm, apparently our 1.9.x example.chk isn't correct.  services.pid is stored in ~/anope/data, not ~/anope/bin.  We'll have to fix that.
Logged

czar

  • Anope User
  • Offline Offline
  • Posts: 5
    • @czarphanguye
Re: services.pid is not being created
« Reply #2 on: December 10, 2009, 05:10:52 PM »

Hmm, apparently our 1.9.x example.chk isn't correct.  services.pid is stored in ~/anope/data, not ~/anope/bin.  We'll have to fix that.

Updated to the latest dev build (1.9.1-p1-source) and noticed example.chk has been fixed.  Ty ;-)
Logged

Charles Kingsley

  • Contributor
  • *
  • Offline Offline
  • Posts: 1405
Re: services.pid is not being created
« Reply #3 on: December 10, 2009, 05:14:07 PM »

Hm, I'm sure I fixed that before ... not a big deal, glad its sorted now.
Logged
Pages: [1]   Go Up