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
- #!/bin/bash
- #chkconfig:2345
- #description: Activitytask Service
- #processname: Activitytask
- php=/usr/bin/php
- Root_path="/vagrant/activity_task/"
- start_file="web_start.php"
- case "$" in
- Start
- Echo ' starting Activity_task web_start.php '
- echo "$php ${root_path}${start_file} start-d"
- $php ${root_path}${start_file} start-d
- ;;
- Stop
- echo "stoping activity_task...web_start.php"
- echo "$php ${root_path}${start_file} Stop"
- $php ${root_path}${start_file} stop
- ;;
- Status
- echo "Status activity_task...web_start.php"
- echo "$php ${root_path}${start_file} status"
- $php ${root_path}${start_file} status
- ;;
- Restart
- echo "Restarting activity_task...web_start.php"
- echo "$php ${root_path}${start_file} Reload"
- $php ${root_path}${start_file} Reload
- ;;
- *)
- Echo "Usage: $ {start|stop|restart|restart}"
- Exit 1
- ;;
- 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