| View previous topic :: View next topic |
| Author |
Message |
Liquid_Squelch
Joined: 11 Mar 2006 Posts: 56
|
Posted: Sun Mar 25, 2012 11:59 pm Post subject: on-connect / on-disconnect passing variables problem |
|
|
I am trying to pass variables to bash script when a mount connects or disconnect, but I seem to have problems.
Here is an example of what I am trying to run when a mount connects or disconnects. These are defined in the <mount> section:
| Code: |
<on-connect>'/path/scripts/kickoff.sh test test Test 5'</on-connect>
<on-disconnect>'/path/scripts/disconnect.sh test test Test 5'</on-disconnect>
|
The 'test test Test 5' are variables sent to the kickoff.sh and disconnect.sh scripts. My thought was to create one bash script to do something rather than create one script per mount. It seems that Icecast errors with the variables in the path. If I remove the variables, Icecast will look for the scripts fine.
I could just create a bash script that has the variables in there to call kickoff.sh. I know that is a work around to the problem, but I would like to know if there is a solution I could use as well.
Thanks! |
|
| Back to top |
|
 |
karlH Code Warrior

Joined: 13 Jun 2005 Posts: 5476 Location: UK
|
Posted: Mon Mar 26, 2012 1:36 am Post subject: |
|
|
the mountpoint is passed to the script when it is called, you do not define your own. Hasn't really been any call to expand the script definition to allow for custom args.
karl. |
|
| Back to top |
|
 |
|