Sorry for noob question, but how to launch getUpdatesCLI.php script in background (getUpdate installation)?
I use this method (by @larknart)
create a daemon configuration script under /etc/init ( NOT /etc/init.d ):-
nano /etc/init/mybot.conf
code sample:-
description "MyBot Daemon"
author "larknart"
start on startup
stop on shutdown
respawn
exec /usr/share/getUpdateCLI.php
alter getUpdateCLI.php:-
below code:
$seconds = 5;
$micro = $seconds * 1000000;
at end of code below:
}
add:-
usleep($micro);
create symbolic link to /usr/share/
ln -s /var/www/html/bot/getUpdateCLI.php /usr/share
after finish all those steps...now you can use " stop mybot | start mybot | status mybot " in terminal then you'll automatically get update.
Thanks for sharing! Would be nice to add this example to the wiki!
thx!
I added this example in the wiki
Thanks!
Most helpful comment
I use this method (by @larknart)
create a daemon configuration script under /etc/init ( NOT /etc/init.d ):-
nano /etc/init/mybot.conf
code sample:-
alter getUpdateCLI.php:-
below code:
while true; do ./getUpdatesCLI.php; done
add:-
at end of code below:
}
add:-
ln -s /var/www/html/bot/getUpdateCLI.php /usr/share
after finish all those steps...now you can use " stop mybot | start mybot | status mybot " in terminal then you'll automatically get update.