Skip to content

Нow to launch getUpdatesCLI.php script in background (getUpdate installation)?

Armando Lüscher edited this page Mar 22, 2017 · 3 revisions

method by @larknart for Ubuntu

  • 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, adding the following at the very bottom:
sleep(5); // Sleep for 5 seconds.
  • Create a symbolic link to /usr/share/:

$ ln -s /var/www/html/bot/getUpdateCLI.php /usr/share

  • You can now use start mybot | stop mybot | status mybot in terminal then you'll automatically get update.