<?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: MDSENV command not found via shell script but works on terminal in API / CLI Discussion</title>
    <link>https://community.checkpoint.com/t5/API-CLI-Discussion/MDSENV-command-not-found-via-shell-script-but-works-on-terminal/m-p/94007#M5093</link>
    <description>&lt;P&gt;Thanks for the prompt reply.&lt;/P&gt;&lt;P&gt;Sorry but I'm still not familiar with mds cli environment. for this case, what is the absolute path for 'mdsenv &amp;lt;domain ip&amp;gt;'?&lt;/P&gt;&lt;P&gt;Tried the&amp;nbsp;&lt;SPAN&gt;"&lt;/SPAN&gt;&lt;SPAN&gt;# !/bin/sh" but no luck.&lt;/SPAN&gt;&lt;/P&gt;</description>
    <pubDate>Thu, 13 Aug 2020 10:15:59 GMT</pubDate>
    <dc:creator>shazwanpacat</dc:creator>
    <dc:date>2020-08-13T10:15:59Z</dc:date>
    <item>
      <title>MDSENV command not found via shell script but works on terminal</title>
      <link>https://community.checkpoint.com/t5/API-CLI-Discussion/MDSENV-command-not-found-via-shell-script-but-works-on-terminal/m-p/93999#M5089</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;Right now I'm working with MDS R77.10 and in the middle of creating mini script (pushpolicy.sh) to automate install policy via cli as per below example. (Currently not pushing via GUI because of timeout issue)&lt;/P&gt;&lt;LI-CODE lang="php"&gt;#!/bin/bash

mdsenv 172.16.1.1
fwm load POLICY_10082020 FW_CLUSTER0001&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;and then chmod the script as well.&lt;/P&gt;&lt;LI-CODE lang="php"&gt;chmod +x pushpolicy.sh&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp; But when I execute the script, below error will come up.&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;[Expert@firewallmds01]#./pushpolicy.sh
./pushpolicy.sh: line 3: mdsenv: command not found
[Expert@firewallmds01]#&lt;/LI-CODE&gt;&lt;P&gt;From my reading, it may related to environment PATH, but still can't figure it out.&lt;/P&gt;&lt;P&gt;How can I overcome this issue? Or any better way to automate this process?&lt;/P&gt;&lt;P&gt;I just want to make this process easier to use by anyone in my team regardless of their linux knowledge.&lt;/P&gt;</description>
      <pubDate>Thu, 13 Aug 2020 09:23:36 GMT</pubDate>
      <guid>https://community.checkpoint.com/t5/API-CLI-Discussion/MDSENV-command-not-found-via-shell-script-but-works-on-terminal/m-p/93999#M5089</guid>
      <dc:creator>shazwanpacat</dc:creator>
      <dc:date>2020-08-13T09:23:36Z</dc:date>
    </item>
    <item>
      <title>Re: MDSENV command not found via shell script but works on terminal</title>
      <link>https://community.checkpoint.com/t5/API-CLI-Discussion/MDSENV-command-not-found-via-shell-script-but-works-on-terminal/m-p/94003#M5090</link>
      <description>&lt;P&gt;why not putting the absolute path? or, alternatively, use "&lt;SPAN&gt;# !/bin/sh" at the beginning &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 13 Aug 2020 10:03:09 GMT</pubDate>
      <guid>https://community.checkpoint.com/t5/API-CLI-Discussion/MDSENV-command-not-found-via-shell-script-but-works-on-terminal/m-p/94003#M5090</guid>
      <dc:creator>_Val_</dc:creator>
      <dc:date>2020-08-13T10:03:09Z</dc:date>
    </item>
    <item>
      <title>Re: MDSENV command not found via shell script but works on terminal</title>
      <link>https://community.checkpoint.com/t5/API-CLI-Discussion/MDSENV-command-not-found-via-shell-script-but-works-on-terminal/m-p/94005#M5092</link>
      <description>&lt;P&gt;Just add&amp;nbsp;&lt;/P&gt;
&lt;LI-CODE lang="none"&gt;source /etc/profile.d/CP.sh;‍‍&lt;/LI-CODE&gt;
&lt;P&gt;right after your #!/bin/bash header.&lt;/P&gt;</description>
      <pubDate>Thu, 13 Aug 2020 10:09:38 GMT</pubDate>
      <guid>https://community.checkpoint.com/t5/API-CLI-Discussion/MDSENV-command-not-found-via-shell-script-but-works-on-terminal/m-p/94005#M5092</guid>
      <dc:creator>Danny</dc:creator>
      <dc:date>2020-08-13T10:09:38Z</dc:date>
    </item>
    <item>
      <title>Re: MDSENV command not found via shell script but works on terminal</title>
      <link>https://community.checkpoint.com/t5/API-CLI-Discussion/MDSENV-command-not-found-via-shell-script-but-works-on-terminal/m-p/94007#M5093</link>
      <description>&lt;P&gt;Thanks for the prompt reply.&lt;/P&gt;&lt;P&gt;Sorry but I'm still not familiar with mds cli environment. for this case, what is the absolute path for 'mdsenv &amp;lt;domain ip&amp;gt;'?&lt;/P&gt;&lt;P&gt;Tried the&amp;nbsp;&lt;SPAN&gt;"&lt;/SPAN&gt;&lt;SPAN&gt;# !/bin/sh" but no luck.&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 13 Aug 2020 10:15:59 GMT</pubDate>
      <guid>https://community.checkpoint.com/t5/API-CLI-Discussion/MDSENV-command-not-found-via-shell-script-but-works-on-terminal/m-p/94007#M5093</guid>
      <dc:creator>shazwanpacat</dc:creator>
      <dc:date>2020-08-13T10:15:59Z</dc:date>
    </item>
    <item>
      <title>Re: MDSENV command not found via shell script but works on terminal</title>
      <link>https://community.checkpoint.com/t5/API-CLI-Discussion/MDSENV-command-not-found-via-shell-script-but-works-on-terminal/m-p/94008#M5094</link>
      <description>&lt;P&gt;This one works!&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks sir!&lt;/P&gt;</description>
      <pubDate>Thu, 13 Aug 2020 10:16:40 GMT</pubDate>
      <guid>https://community.checkpoint.com/t5/API-CLI-Discussion/MDSENV-command-not-found-via-shell-script-but-works-on-terminal/m-p/94008#M5094</guid>
      <dc:creator>shazwanpacat</dc:creator>
      <dc:date>2020-08-13T10:16:40Z</dc:date>
    </item>
    <item>
      <title>Re: MDSENV command not found via shell script but works on terminal</title>
      <link>https://community.checkpoint.com/t5/API-CLI-Discussion/MDSENV-command-not-found-via-shell-script-but-works-on-terminal/m-p/94013#M5095</link>
      <description>&lt;P&gt;Thanks Danny.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;It works perfectly!&lt;/P&gt;</description>
      <pubDate>Thu, 13 Aug 2020 11:56:46 GMT</pubDate>
      <guid>https://community.checkpoint.com/t5/API-CLI-Discussion/MDSENV-command-not-found-via-shell-script-but-works-on-terminal/m-p/94013#M5095</guid>
      <dc:creator>shazwanpacat</dc:creator>
      <dc:date>2020-08-13T11:56:46Z</dc:date>
    </item>
    <item>
      <title>Re: MDSENV command not found via shell script but works on terminal</title>
      <link>https://community.checkpoint.com/t5/API-CLI-Discussion/MDSENV-command-not-found-via-shell-script-but-works-on-terminal/m-p/94085#M5099</link>
      <description>&lt;P&gt;mdsenv is under $MDSDIR/bin/, which can be resolved to different actual paths, depending on the version.&lt;/P&gt;</description>
      <pubDate>Fri, 14 Aug 2020 05:57:44 GMT</pubDate>
      <guid>https://community.checkpoint.com/t5/API-CLI-Discussion/MDSENV-command-not-found-via-shell-script-but-works-on-terminal/m-p/94085#M5099</guid>
      <dc:creator>_Val_</dc:creator>
      <dc:date>2020-08-14T05:57:44Z</dc:date>
    </item>
    <item>
      <title>Re: MDSENV command not found via shell script but works on terminal</title>
      <link>https://community.checkpoint.com/t5/API-CLI-Discussion/MDSENV-command-not-found-via-shell-script-but-works-on-terminal/m-p/94086#M5100</link>
      <description>&lt;P&gt;Good catch,&amp;nbsp;&lt;a href="https://community.checkpoint.com/t5/user/viewprofilepage/user-id/687"&gt;@Danny&lt;/a&gt;, did not think of that &lt;span class="lia-unicode-emoji" title=":face_with_rolling_eyes:"&gt;🙄&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 14 Aug 2020 05:58:36 GMT</pubDate>
      <guid>https://community.checkpoint.com/t5/API-CLI-Discussion/MDSENV-command-not-found-via-shell-script-but-works-on-terminal/m-p/94086#M5100</guid>
      <dc:creator>_Val_</dc:creator>
      <dc:date>2020-08-14T05:58:36Z</dc:date>
    </item>
    <item>
      <title>Re: MDSENV command not found via shell script but works on terminal</title>
      <link>https://community.checkpoint.com/t5/API-CLI-Discussion/MDSENV-command-not-found-via-shell-script-but-works-on-terminal/m-p/204698#M8327</link>
      <description>&lt;P&gt;Absolute paths are always a bad thing.&lt;/P&gt;
&lt;P&gt;I had to cleanup too many messes because someone did put in a hard path that failed after an upgrade.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 31 Jan 2024 15:46:49 GMT</pubDate>
      <guid>https://community.checkpoint.com/t5/API-CLI-Discussion/MDSENV-command-not-found-via-shell-script-but-works-on-terminal/m-p/204698#M8327</guid>
      <dc:creator>Hugo_vd_Kooij</dc:creator>
      <dc:date>2024-01-31T15:46:49Z</dc:date>
    </item>
  </channel>
</rss>

