I would agree with @rich7177 that there is no native Splunk way to do this (There could be but I've never heard of it)
Since your on a Linux server, this should be somewhat straight forward to do with some scripting
I would first start by going into etc/init.d and create a script which will start on boot. The script should then look like this
#!/bin/bash
cd /some/directory/foo.conf
# Cat foo.conf and run a regular expression against it and extract the hostname and save it as a variable below
host="hostname"
cd /opt/splunk/bin
./splunk stop
cd /opt/splnuk/etc/system/local
mv inputs.conf inputsOLD.conf
touch inputs.conf
#Use sed to display your $host and fill in the rest of your inputs.conf stanza
cd /opt/splunk/bin
./splunk start
This is untested, but I've done a lot of automation in my day so I'm fairly confident this will dynamically modify your inputs.conf correctly
... View more