• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 222
  • Last Modified:

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!
0
partiallynothing
Asked:
partiallynothing
1 Solution
 
partiallynothingAuthor Commented:
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?
0
 
manav_mathurCommented:
Because probably your hash-bang is incorrect....its
#!/bin/bash

and not
!#/bin/bash

Manav
0
 
moduloCommented:
PAQed with no points refunded (of 125)

modulo
Community Support Moderator
0

Featured Post

Become an Android App Developer

Ready to kick start your career in 2018? Learn how to build an Android app in January’s Course of the Month and open the door to new opportunities.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now