<?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 Is there a way for my app to run a Python function on server start? in Splunk Dev</title>
    <link>https://community.splunk.com/t5/Splunk-Dev/Is-there-a-way-for-my-app-to-run-a-Python-function-on-server/m-p/261094#M3242</link>
    <description>&lt;P&gt;I want Splunk to run my script when the server starts &amp;amp; stops. Of course I can write a custom shell script to launch Splunk &amp;amp; do that by hand, but is there a way to have my App run on startup? &lt;/P&gt;</description>
    <pubDate>Thu, 20 Oct 2016 11:41:07 GMT</pubDate>
    <dc:creator>matutter4</dc:creator>
    <dc:date>2016-10-20T11:41:07Z</dc:date>
    <item>
      <title>Is there a way for my app to run a Python function on server start?</title>
      <link>https://community.splunk.com/t5/Splunk-Dev/Is-there-a-way-for-my-app-to-run-a-Python-function-on-server/m-p/261094#M3242</link>
      <description>&lt;P&gt;I want Splunk to run my script when the server starts &amp;amp; stops. Of course I can write a custom shell script to launch Splunk &amp;amp; do that by hand, but is there a way to have my App run on startup? &lt;/P&gt;</description>
      <pubDate>Thu, 20 Oct 2016 11:41:07 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Dev/Is-there-a-way-for-my-app-to-run-a-Python-function-on-server/m-p/261094#M3242</guid>
      <dc:creator>matutter4</dc:creator>
      <dc:date>2016-10-20T11:41:07Z</dc:date>
    </item>
    <item>
      <title>Re: Is there a way for my app to run a Python function on server start?</title>
      <link>https://community.splunk.com/t5/Splunk-Dev/Is-there-a-way-for-my-app-to-run-a-Python-function-on-server/m-p/261095#M3243</link>
      <description>&lt;P&gt;You could create a modular input using the python SDK. It is not really hard. Here is a basic example: &lt;A href="https://github.com/kospol/splunk_simplePythonModularInput"&gt;https://github.com/kospol/splunk_simplePythonModularInput&lt;/A&gt;&lt;/P&gt;

&lt;P&gt;Then your script can just be an app inside splunk. &lt;/P&gt;</description>
      <pubDate>Thu, 20 Oct 2016 11:47:13 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Dev/Is-there-a-way-for-my-app-to-run-a-Python-function-on-server/m-p/261095#M3243</guid>
      <dc:creator>thejeffreystone</dc:creator>
      <dc:date>2016-10-20T11:47:13Z</dc:date>
    </item>
    <item>
      <title>Re: Is there a way for my app to run a Python function on server start?</title>
      <link>https://community.splunk.com/t5/Splunk-Dev/Is-there-a-way-for-my-app-to-run-a-Python-function-on-server/m-p/261096#M3244</link>
      <description>&lt;P&gt;Thanks, this was helpful. But really what I'm looking for is way to execute something from an "appserver" app. I have a bunch of views which need to be changed by a python script when I do a   &lt;CODE&gt;splunk restartss&lt;/CODE&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 27 Oct 2016 11:50:46 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Dev/Is-there-a-way-for-my-app-to-run-a-Python-function-on-server/m-p/261096#M3244</guid>
      <dc:creator>matutter4</dc:creator>
      <dc:date>2016-10-27T11:50:46Z</dc:date>
    </item>
    <item>
      <title>Re: Is there a way for my app to run a Python function on server start?</title>
      <link>https://community.splunk.com/t5/Splunk-Dev/Is-there-a-way-for-my-app-to-run-a-Python-function-on-server/m-p/261097#M3245</link>
      <description>&lt;P&gt;If you are on *nix, then you might be able to edit /etc/init.d/splunk &lt;/P&gt;

&lt;P&gt;I suspect if you run 'splunk enable boot-start' you will overwrite your changes though. But in there you could add your script to the splunk_start(), and splunk_restart() &lt;/P&gt;</description>
      <pubDate>Tue, 29 Sep 2020 11:36:44 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Dev/Is-there-a-way-for-my-app-to-run-a-Python-function-on-server/m-p/261097#M3245</guid>
      <dc:creator>thejeffreystone</dc:creator>
      <dc:date>2020-09-29T11:36:44Z</dc:date>
    </item>
  </channel>
</rss>

