البرنامج النصي يونيكورن - لا تبدأ في التمهيد
-
16-11-2019 - |
سؤال
أنا جديد جدا لإدارة النظام وليس لديك أي فكرة عن كيفية عمل init.d.لذلك ربما أفعل شيئا خاطئا هنا.
أحاول بدء تشغيل يونيكورن على التمهيد، ولكن بطريقة ما فشلت في البدء في كل مرة.أنا قادر على القيام بدخول يدويا / إيقاف / إعادة تشغيل بواسطة ببساطة Service App_Name Start.لا يمكن أن يبدو أن يفهم لماذا لا يبدأ يونيكورن عند التمهيد إذا كان إيقاف التشغيل اليدوي من أعمال الخدمة.بعض قضية إذن المستخدم ربما ؟؟
البرنامج النصي الجديد يونيكورن وملفات تكوين يونيكورن متوفرة هنا https://gist.github.com/1956543
أنا أقوم بإعداد بيئة تطوير على Ubuntu 11.1 تشغيل داخل VM.
المحلول
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.
نصائح أخرى
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'