CPUG

The Check Point User Group

A Resource For The Check Point Community.  Fast.  Useful.  Independent.

1. CCSA/CCSE One-Week Dual-Certification Training Course with CPUG in San Francisco!
    Courses Starting (2009) 1/19, 2/9, 3/9, 4/6, 5/4, 6/8, 7/6, 8/3.
2. Join Us On LinkedIn - We now have a CPUG group.


Go Back   CPUG: The Check Point User Group > Check Point Firewall-1/VPN-1 Platforms > Check Point SecurePlatform (SPLAT)
Register FAQ Members List Calendar Search Today's Posts Mark Forums Read

Reply
 
LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 2007-02-14
Junior Member
 
Join Date: 2007-02-14
Posts: 4
Rep Power: 0
kippo has an average reputation (10+)
Default upgrade_export crontab automation problem

Hi All

I have a problem when trying to run an automated upgade_export script via crontab on SecurePlatform.

The script executes perfectly when ran from the command line, but when ran via crontab, the upgrade_export part of the script doesn’t run.


Crontab
------------------

1 0 * * * bash /home/username/upgrade_export_script


upgrade_export_script
------------------

#!/bin/sh
cd /opt/CPsuite-R60/fw1/bin/upgrade_tools/
rm *fw_export.tgz
echo | ./upgrade_export "$(date +%d-%m-%y)"_fw_export
ftp -inv < ftpuploadscript
exit 0



echo | ./upgrade_export "$(date +%d-%m-%y)"_fw_export

this line does not execute when ran via crontab

I know the script is running via crontab as the .tgz file is removed and if I add a test.txt file and do a ‘put test.txt’ line into the ftpuploadscript, this file is ftp’ed. This shows that the script is running via crontab, just not the upgrade_export procedure.

Any ideas, or is there another way of doing this?
Reply With Quote
  #2 (permalink)  
Old 2007-02-15
Member
 
Join Date: 2006-10-05
Location: Rennes, FRANCE
Posts: 34
Rep Power: 0
aenima has an average reputation (10+)
Default Re: upgrade_export crontab automation problem

Add . /etc/profile.d/CP.sh after #!/bin/sh (there a space between the . and the /)

It should work now ;-)
Reply With Quote
  #3 (permalink)  
Old 2007-02-16
Junior Member
 
Join Date: 2007-02-14
Posts: 4
Rep Power: 0
kippo has an average reputation (10+)
Default Re: upgrade_export crontab automation problem

thanks aenima

you pointed me in the right direction, the line that i enter that works is below, cheers -

. /opt/CPshrd-R60/tmp/.CPprofile.sh
Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are Off
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


All times are GMT -7. The time now is 23:19.


Powered by vBulletin® Version 3.7.4
Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO 3.2.0