Script Init Unicorn - não começando na inicialização
-
16-11-2019 - |
Pergunta
Eu sou muito novo para a administração do sistema e não tenho ideia de como o Init.d funciona.Então talvez eu esteja fazendo algo errado aqui.
Estou tentando começar o unicórnio na inicialização, mas de alguma forma não consegue começar toda vez.Eu sou capaz de fazer manualmente um início / parada / reiniciar simplesmente serviço app_name start.Não consigo entender por que o Unicórnio não começa na inicialização se o manual começando a parada de serviço.Algum problema de permissão do usuário talvez ??
My Unicorn Init Script e os arquivos de configuração do Unicorn estão disponíveis aqui https://gist.github.com/1956543
Estou configurando um ambiente de desenvolvimento no Ubuntu 11.1 correndo dentro de uma VM.
Solução
To get Unicorn to run when your system boots, you need to associate the init.d script with the default set of "runlevels", which are the modes that Ubuntu enters as it boots.
There are several different runlevels, but you probably just want the default set. To install Unicorn here, run:
sudo update-rc.d <your service name> defaults
For more information, check out the update-rc.d man page.
Outras dicas
You can configure a cron job to start the unicorn server on reboot
crontab -e
and add
@reboot /bin/bash -l -c 'service unicorn_<your service name> start >> /<path to log file>/cron.log 2>&1'