2017-05-02 1 views
0

Il existe un moyen de créer un service personnalisé dans ubuntu 16.04? Je veux quelque chose Autostart au démarrage, gérable avec service mycustomservice startService personnalisé du serveur Ubuntu 16.04

Et le service doit démarrer un php websocket: (php ratchet)

php -f socket.php 
+0

au moins pouvez-vous me dire pourquoi downvote? juste pour comprendre. J'ai cherché sur google mais rien. –

+0

essayez d'utiliser crontab –

Répondre

0

essayer avec supervisorenter link description here

[program:ratchet] 
command     = bash -c "ulimit -n 10000; exec /usr/bin/php ./bin/tutorial-terminal-chat.php" 
process_name   = Ratchet 
numprocs    = 1 
autostart    = true 
autorestart    = true 
user     = root 
stdout_logfile   = ./logs/info.log 
stdout_logfile_maxbytes = 1MB 
stderr_logfile   = ./logs/error.log 
stderr_logfile_maxbytes = 1MB