[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: boot order



But you are are not going to show this script to us.

:-) See at the end of email

You might want to look at @reboot with cron for the startup.

thanks :-)

The domain for your email address is
[...]

domain (mine) of email (mine) is not your problem and if you don't like it's not my problem ;-)

here the script (rearrange) for debian

bye

Pol

EMAIL="root"
RESTARTSUBJECT="["`hostname`" "`date`"] – System Startup"
SHUTDOWNSUBJECT="["`hostname`" "`date`"] – System Shutdown"
RESTARTBODY="This is an automated message to notify you that "`hostname`" started successfully. Start up Date and Time: "`date` SHUTDOWNBODY="This is an automated message to notify you that "`hostname`" is shutting down. Shutdown Date and Time: "`date`
LOCKFILE=/var/lock/SystemEmail
RETVAL=0
# Source function library.
. /lib/lsb/init-functions
stop()
  {
  echo -n "Sending Shutdown Email: "
  echo "${SHUTDOWNBODY}" | mail -s "${SHUTDOWNSUBJECT}" ${EMAIL}
  sleep 4
  RETVAL=$?
  sleep 4
  if [ ${RETVAL} -eq 0 ]; then
    rm -f ${LOCKFILE}
    sleep 4
    log_success_msg
  else
    log_failure_msg
  fi
  echo
  return ${RETVAL}
  }
start()
  {
  echo -n "Sending Startup Email: "
  echo "${RESTARTBODY}" | mail -s "${RESTARTSUBJECT}" ${EMAIL}
  RETVAL=$?
  if [ ${RETVAL} -eq 0 ]; then
    touch ${LOCKFILE}
    log_success_msg
  else
    log_failure_msg
  fi
  echo
  return ${RETVAL}
  }
case "$1" in
  start)
    start
  ;;
  stop)
    stop
  ;;
  status)
    echo "Not applied to service"
  ;;
  restart)
    stop
    start
  ;;
  reload)
    echo "Not applied to service"
  ;;
  condrestart)
  #
    echo "Not applied to service"
  ;;
  probe)
  ;;
  *)
    echo "Usage: SystemEmail{start|stop|status|reload|restart[|probe]"
  exit 1
  ;;
esac
exit ${RETVAL}


--
Pol


Reply to: