Workman Project Setup Boot from

Source: Internet
Author: User

78558317

Http://man.linuxde.net/chkconfig

1. Scripting 1.2. The first three lines of the script note is required to register the service, you can change parameters, set the PHP installation path, project and path, boot files can be
  1. #!/bin/bash
  2. #chkconfig:2345
  3. #description: Activitytask Service
  4. #processname: Activitytask
  5. php=/usr/bin/php
  6. Root_path="/vagrant/activity_task/"
  7. start_file="web_start.php"
  8. case "$" in
  9. Start
  10. Echo ' starting Activity_task web_start.php '
  11. echo "$php ${root_path}${start_file} start-d"
  12. $php ${root_path}${start_file} start-d
  13. ;;
  14. Stop
  15. echo "stoping activity_task...web_start.php"
  16. echo "$php ${root_path}${start_file} Stop"
  17. $php ${root_path}${start_file} stop
  18. ;;
  19. Status
  20. echo "Status activity_task...web_start.php"
  21. echo "$php ${root_path}${start_file} status"
  22. $php ${root_path}${start_file} status
  23. ;;
  24. Restart
  25. echo "Restarting activity_task...web_start.php"
  26. echo "$php ${root_path}${start_file} Reload"
  27. $php ${root_path}${start_file} Reload
  28. ;;
  29. *)
  30. Echo "Usage: $ {start|stop|restart|restart}"
  31. Exit 1
  32. ;;
  33. Esac
1.2 Configuring boot-up

1. configuration file executable, chmod +x service_name (assuming script file named Service_Name)

2. Set the run level of the service, default 2345. So choose Default.

Chkconfig service_name on

---------------------This article from the CSDN blog with the Wind, full-text address please click: 78558317?utm_source=copy

Workman Project Setup Boot from

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.