View Single Post
  #3   (View Single Post)  
Old 15th October 2008
BSDKaffee's Avatar
BSDKaffee BSDKaffee is offline
Real Name: Jason Hale
Coffee Addict
 
Join Date: May 2008
Location: Wintersville, Ohio
Posts: 212
Default

Quote:
Originally Posted by Xtender View Post
Code:
/usr/bin/touch /var/log/`date "+%H-%M-%S"`-test.log
Try using the full path of 'date': /bin/date

You should also add rcorder(8) keywords. It should at least be:
Code:
#!/bin/sh

# PROVIDE: test
# REQUIRE: DAEMON

. /etc/rc.subr

name="test"
rcvar=`set_rcvar`

load_rc_config ${name}

: ${test_enable="NO"}

start_cmd="${name}_start"
stop_cmd=":"

test_start()
{
/usr/bin/touch /var/log/`/bin/date "+%H-%M-%S"`-test.log
}

run_rc_command "$1"

Last edited by BSDKaffee; 15th October 2008 at 11:52 PM.
Reply With Quote