Hi all, I'm working on a script sh or bash that will make simple tasks like moving files or insert rows in mysql db, I wanted to ask, since the program must always be active if there is a way to create a script not tied to the terminal from which it is launched and it works like a demon that is completely in the background.
Thanks
Scheduled Maintenance: We are aware of an issue with Google, AOL, and Yahoo services as email providers which are blocking new registrations. We are trying to fix the issue and we have several internal and external support tickets in process to resolve the issue. Please see: viewtopic.php?t=158230
Script in Background
Re: Script in Background
Debugging is twice as hard as writing the code in the first place. Therefore, if you write the code as cleverly as possible, you are, by definition, not smart enough to debug it. -- Brian Kernighan
-
- Posts: 5
- Joined: 2014-10-05 02:40
Re: Script in Background
First of all, thank you for your response.
But I was looking for a method in script to do this,
currently my code is very simple:
The problem is that inotifywait has the ability to be launched in backgorund "-d" but only if saves the actions in a log file and without being able to perform operations.
Is possible edit the script for execute all process (cicle including) in background?
It may seem like a silly requirement, but the script is intended to implement other function and this would be a helpful feature. Thanks
But I was looking for a method in script to do this,
currently my code is very simple:
Code: Select all
while inotifywait -e modify /var/log/proftpd/xferlog; do
#my function es.
#php /var/www/index.php
done
Is possible edit the script for execute all process (cicle including) in background?
It may seem like a silly requirement, but the script is intended to implement other function and this would be a helpful feature. Thanks