TIP: Click on subject to list as thread! ANSI
echo: mbse
to: Vince Coen
from: Gert Andersen
date: 2012-10-15 09:25:24
subject: Make mbse post a text file

* Reply to message originally in area CarbonArea

Hello Vince!

Sun Oct 14 2012, Vince Coen wrote to Gert Andersen:

 VC>>> Have you checked your paths and others eg, set | less  ?

 >> Yes that have I done and it is only while the crontab shall run the
 >> scripts the problem comes and if I run the script file manually is
 >> there no problem.

 VC>OK, I think I see the problem, let me look at my setup .....

 VC>Look at your etc/monthly script and see if it looks similar to mine:

 VC>--------------------------
 VC>#!/bin/sh
 VC>#
 VC># MBSE BBS Monthly - Should be run at the first of the month at 00:10
 VC>#
 VC># $Id: monthly,v 1.3 2004/06/01 19:33:28 mbse Exp $
 VC>MBSE_ROOT=/opt/mbse;export MBSE_ROOT

 VC>if [ "$MBSE_ROOT" = "" ]; then
 VC>   export MBSE_ROOT=`cat /etc/passwd | grep mbse: | awk -F ':' '{ print 
 VC>$6}'`
 VC>fi
 VC>#if [ "`id -un`" != "mbse" ] ; then
 VC>#   echo "Must be run by user 'mbse'"
 VC>#   exit 1
 VC>#fi

 VC># While the system is on UPS battery power, don't start maintenance
 VC>#
 VC>while [ -f $MBSE_ROOT/var/sema/upsalarm ]; do
 VC>   sleep 60
 VC>done
 VC>$MBSE_ROOT/bin/mbfido notify -quiet
 VC>$MBSE_ROOT/tmp/runturqstat.sh

 VC>--------------------------

 VC>It's the last two lines.

 VC>This is forcing the programs to run under the settings for $MBSE_ROOT

 VC>Otherwise the programs will fail.

Yes it is near to the same except your first lines command and 2 last lines
commands, my 2 last lines is used as the defailt for mbindex.
I got my crontab to work now with change its command line to be using:
export MBSE_ROOT=/opt/mbse; $MBSE_ROOT/etc/hello.sh 
and it look to work that way adn I added in my hello.sh last to use
$HOME/bin/mbmsg post ....

I test it out and it works the text file is been posted as it shall by the cron now.

  Take care,
            Gert

      - Get the best with linux - 

--- Msged/LNX 6.2.0 (Linux/2.6.39-gentoo-r1 (x86_64))
* Origin: * One bird in hand is better than 10 on the roof * (2:230/150)
SEEN-BY: 3/0 633/267 640/954 712/0 313 620 848 953
@PATH: 230/150 261/38 712/848 633/267

SOURCE: echomail via fidonet.ozzmosis.com

Email questions or comments to sysop@ipingthereforeiam.com
All parts of this website painstakingly hand-crafted in the U.S.A.!
IPTIA BBS/MUD/Terminal/Game Server List, © 2025 IPTIA Consulting™.