<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: FWM Command in bash script in Firewall and Security Management</title>
    <link>https://community.checkpoint.com/t5/Firewall-and-Security-Management/FWM-Command-in-bash-script/m-p/28704#M95029</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;At the top of my cronjobs that require Checkpoint Environment Variables I use:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;#Load Checkpoint Environment Variables&lt;BR /&gt;source /etc/profile.d/CP.sh&lt;BR /&gt;if [[ -e /etc/profile.d/vsenv.sh ]]; then&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; source /etc/profile.d/vsenv.sh&lt;BR /&gt;fi&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The outcome should be the same as what Tim provided.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 07 Jun 2018 15:43:33 GMT</pubDate>
    <dc:creator>Bryce_Myers</dc:creator>
    <dc:date>2018-06-07T15:43:33Z</dc:date>
    <item>
      <title>FWM Command in bash script</title>
      <link>https://community.checkpoint.com/t5/Firewall-and-Security-Management/FWM-Command-in-bash-script/m-p/28700#M95025</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;SPAN style="font-size: 11.0pt; color: black;"&gt;Hello,&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: black; font-size: 11.0pt;"&gt;I try to run a bash script as a schedules task (admin user) via Gaia on a R77.30 management server. The purpose of the script is to use the "fwm logexport" command to convert log files to ascii format and then move the file over scp to a Linux server.&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: black; font-size: 11.0pt;"&gt;Everything works as expected when calling the script on the command line via expert mode. When the script runs from the cron job everything works the same except that the fwm command cannot be found.&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;&lt;SPAN style="font-size: 11.0pt; color: black;"&gt;When I just use "fwm" as command in the script I get this error: "&lt;SPAN&gt;fwm: command not found&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;SPAN&gt;"&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: black; font-size: 11.0pt;"&gt;When I try to specify the whole path "&lt;SPAN&gt;/opt/CPsuite-R77/fw1/bin/fwm" I get this error: "&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;SPAN&gt;&lt;SPAN style="font-size: 11.0pt; color: black;"&gt;/opt/CPsuite-R77/fw1/bin/fwm: error while loading shared libraries: libcplic_cntrct.so: cannot open shared object file: No such file or directory&lt;/SPAN&gt;&lt;SPAN&gt;&lt;SPAN&gt;"&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: black; font-size: 11.0pt;"&gt;Thanks in advanced,&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: black; font-size: 11.0pt;"&gt;Dominik&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 07 Jun 2018 13:42:48 GMT</pubDate>
      <guid>https://community.checkpoint.com/t5/Firewall-and-Security-Management/FWM-Command-in-bash-script/m-p/28700#M95025</guid>
      <dc:creator>Dominik_Wasiele</dc:creator>
      <dc:date>2018-06-07T13:42:48Z</dc:date>
    </item>
    <item>
      <title>Re: FWM Command in bash script</title>
      <link>https://community.checkpoint.com/t5/Firewall-and-Security-Management/FWM-Command-in-bash-script/m-p/28701#M95026</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Do you have the following early on in your script to properly set the different Check Point environment variables including PATH:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;&lt;STRONG&gt;source /opt/CPshrd-R77/tmp/.CPprofile.sh&lt;/STRONG&gt;&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;or&lt;/P&gt;&lt;P&gt;&lt;EM&gt;&lt;STRONG&gt;source /opt/CPshrd-R77/tmp/.CPprofile.csh&lt;/STRONG&gt;&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;--&lt;BR /&gt; Second Edition of my "Max Power" Firewall Book&lt;BR /&gt; Now Available at &lt;A href="http://www.maxpowerfirewalls.com" target="_blank"&gt;http://www.maxpowerfirewalls.com&lt;/A&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 07 Jun 2018 13:56:51 GMT</pubDate>
      <guid>https://community.checkpoint.com/t5/Firewall-and-Security-Management/FWM-Command-in-bash-script/m-p/28701#M95026</guid>
      <dc:creator>Timothy_Hall</dc:creator>
      <dc:date>2018-06-07T13:56:51Z</dc:date>
    </item>
    <item>
      <title>Re: FWM Command in bash script</title>
      <link>https://community.checkpoint.com/t5/Firewall-and-Security-Management/FWM-Command-in-bash-script/m-p/28702#M95027</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I recommend to add the line below on top of your script:&lt;/P&gt;&lt;PRE class="language-none line-numbers"&gt;&lt;CODE&gt;source /etc/profile.d/CP.sh;‍&lt;SPAN class="line-numbers-rows"&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In case you also wish to create similar scripts on VSX systems, just add this line as well:&lt;/P&gt;&lt;PRE class="language-none line-numbers"&gt;&lt;CODE&gt;source /etc/profile.d/vsenv.sh;‍&lt;SPAN class="line-numbers-rows"&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 07 Jun 2018 14:10:33 GMT</pubDate>
      <guid>https://community.checkpoint.com/t5/Firewall-and-Security-Management/FWM-Command-in-bash-script/m-p/28702#M95027</guid>
      <dc:creator>Danny</dc:creator>
      <dc:date>2018-06-07T14:10:33Z</dc:date>
    </item>
    <item>
      <title>Re: FWM Command in bash script</title>
      <link>https://community.checkpoint.com/t5/Firewall-and-Security-Management/FWM-Command-in-bash-script/m-p/28703#M95028</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Many thanks this solved my issue.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 07 Jun 2018 14:34:33 GMT</pubDate>
      <guid>https://community.checkpoint.com/t5/Firewall-and-Security-Management/FWM-Command-in-bash-script/m-p/28703#M95028</guid>
      <dc:creator>Dominik_Wasiele</dc:creator>
      <dc:date>2018-06-07T14:34:33Z</dc:date>
    </item>
    <item>
      <title>Re: FWM Command in bash script</title>
      <link>https://community.checkpoint.com/t5/Firewall-and-Security-Management/FWM-Command-in-bash-script/m-p/28704#M95029</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;At the top of my cronjobs that require Checkpoint Environment Variables I use:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;#Load Checkpoint Environment Variables&lt;BR /&gt;source /etc/profile.d/CP.sh&lt;BR /&gt;if [[ -e /etc/profile.d/vsenv.sh ]]; then&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; source /etc/profile.d/vsenv.sh&lt;BR /&gt;fi&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The outcome should be the same as what Tim provided.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 07 Jun 2018 15:43:33 GMT</pubDate>
      <guid>https://community.checkpoint.com/t5/Firewall-and-Security-Management/FWM-Command-in-bash-script/m-p/28704#M95029</guid>
      <dc:creator>Bryce_Myers</dc:creator>
      <dc:date>2018-06-07T15:43:33Z</dc:date>
    </item>
    <item>
      <title>Re: FWM Command in bash script</title>
      <link>https://community.checkpoint.com/t5/Firewall-and-Security-Management/FWM-Command-in-bash-script/m-p/28705#M95030</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks Bryce - this helped me out finishing a script today and having issues with the same error Dominik had, but on R80.20.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 01 Nov 2018 20:45:40 GMT</pubDate>
      <guid>https://community.checkpoint.com/t5/Firewall-and-Security-Management/FWM-Command-in-bash-script/m-p/28705#M95030</guid>
      <dc:creator>Joseph_Audet</dc:creator>
      <dc:date>2018-11-01T20:45:40Z</dc:date>
    </item>
    <item>
      <title>Re: FWM Command in bash script</title>
      <link>https://community.checkpoint.com/t5/Firewall-and-Security-Management/FWM-Command-in-bash-script/m-p/129507#M95031</link>
      <description>&lt;P&gt;Hi Guys&lt;/P&gt;&lt;P&gt;i've just updated VSX R80.30 to R80.40 but the script doesn't work into crontab&lt;/P&gt;&lt;P&gt;Here the script:&lt;/P&gt;&lt;P&gt;#!/bin/bash -f&lt;BR /&gt;#&lt;BR /&gt;#&lt;BR /&gt;source /etc/profile.d/vsenv.sh;&lt;BR /&gt;vsenv 4&lt;BR /&gt;cphaprob state | grep local | grep ACTIVE &amp;gt;&amp;gt; /dev/null&lt;/P&gt;&lt;P&gt;if [ $? -eq 0 ]; then&lt;/P&gt;&lt;P&gt;echo "--- Vpn user counter ---" &amp;gt; /tmp/userc_users&lt;BR /&gt;fw tab -t userc_users -s &amp;gt; /tmp/userc_users&lt;/P&gt;&lt;P&gt;source /etc/profile.d/vsenv.sh;&lt;BR /&gt;vsenv 0&lt;BR /&gt;# Leggo il file temporaneo e mando il contenuto via mail&lt;BR /&gt;cat /tmp/userc_users | $FWDIR/bin/sendmail -s 'Test' -t 10.79.226.17 -f xxxx@yyy.it wwww@yyy.it&lt;/P&gt;&lt;P&gt;else&lt;BR /&gt;exit&lt;BR /&gt;fi&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;If i launc manually works&lt;/P&gt;&lt;P&gt;thanks in advance&lt;/P&gt;</description>
      <pubDate>Wed, 15 Sep 2021 12:25:32 GMT</pubDate>
      <guid>https://community.checkpoint.com/t5/Firewall-and-Security-Management/FWM-Command-in-bash-script/m-p/129507#M95031</guid>
      <dc:creator>dprimiceri</dc:creator>
      <dc:date>2021-09-15T12:25:32Z</dc:date>
    </item>
    <item>
      <title>Re: FWM Command in bash script</title>
      <link>https://community.checkpoint.com/t5/Firewall-and-Security-Management/FWM-Command-in-bash-script/m-p/224112#M95032</link>
      <description>&lt;P&gt;Try to replace:&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;#!/bin/bash -f&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;with:&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;#!/bin/bash&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 20 Aug 2024 19:52:34 GMT</pubDate>
      <guid>https://community.checkpoint.com/t5/Firewall-and-Security-Management/FWM-Command-in-bash-script/m-p/224112#M95032</guid>
      <dc:creator>Jan_P_Larsson</dc:creator>
      <dc:date>2024-08-20T19:52:34Z</dc:date>
    </item>
  </channel>
</rss>

