Link to home
Start Free TrialLog in
Avatar of partiallynothing
partiallynothing

asked on

Automation of a console PHP script.

I have a theatre PHP application I made which I have automatically run whenever anyone logs into the account 'theatre'.  I have done this by adding the line 'php /usr/share/theatre/theatre.php' to '.bash_profile' of the user.  This works fine for invoking the script, but I also want it to automatically log out of 'theatre' if a user attempts to close the program.  How can this be accomplished?  Thanks in advance for your help!
Avatar of partiallynothing
partiallynothing

ASKER

Another idea I had was to make something like '/bin/theatre_control' the user's shell with something like this in it:

!#/bin/bash
php /usr/share/theatre/theatre_sound.php

But this did not work.  Any ideas?
Because probably your hash-bang is incorrect....its
#!/bin/bash

and not
!#/bin/bash

Manav
ASKER CERTIFIED SOLUTION
Avatar of modulo
modulo

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial