Akopia Akopia Services

[Date Prev][Date Next][Thread Prev][Thread Next][Minivend by date ][Minivend by thread ]

Re: [mv] MV Startup Script Will Not Start Up



******    message to minivend-users from "Bill Randle" <billr@exgate.tek.com>     ******

On Aug 20,  2:24am, Sydney Urshan wrote:
} Subject: Re: [mv] MV Startup Script Will Not Start Up
} ******    message to minivend-users from Sydney Urshan
<urshan@nethollywood.net>     ******
}
} I checked the log and it appears that MySQL is not completely started
} up by the time minivend starts up in rc.local, so it fails.  I
} renamed minivend and put it in init.d after MySQL, but it still does
} not work.  How do I make sure that minivend is the last thing that
} starts?

Sydney,

You don't mention what OS/distribution you're running, but if your
startup scripts are in the SysV form (which I suspect they are
since you referenced the init.d directory), you can control the
order of execution by changing the script name.

For example, on my system, in /etc/rc.d/rc2.d mySQL is started via
S90mysql and minivend via S95minivend. The "S95" prefix guarantees
that minvend will start after mySQL which has a "S90" prefix. You
could rename minivend to S99minivend and it will start after
everything that is alphabetically "earlier". On my system (RH6.2),
it would be: ... S90mysql S90xfs S99linuxconf S99local S99minivend.

Alternatively, perhaps the best thing to do is add a "sleep 5" after
the mySQL startup to pause long enough for mySQL to startup. E.g.,
in S90mysql:

case "$mode" in
  'start')
    # Start daemon

    if test -x $bindir/safe_mysqld
    then
      # Give extra arguments to mysqld with the my.cnf file. This script may
      # be overwritten at next upgrade.
      $bindir/safe_mysqld --user=$mysql_daemon_user --pid-file=$pid_file
--datad
ir=$datadir &
      sleep 5  <<<<<------ added line
    else
      echo "Can't execute $bindir/safe_mysqld"
    fi
    ;;

Adjust the time delay as necessary to ensure that mySQL is fully started
before minivend starts up.

	-Bill
-
To unsubscribe from the list, DO NOT REPLY to this message.  Instead, send
email with 'UNSUBSCRIBE minivend-users' in the body to Majordomo@minivend.com.
Archive of past messages: http://www.minivend.com/minivend/minivend-list


Search for: Match: Format: Sort by: