linux chkconfig配置自启动shell
2015-12-03 19:05
603 查看
$vim /etc/init.d/temp2file_luncher.sh
$chkconfig --add temp2file_luncher.sh
#!/bin/bash # chkconfig: 2345 66 36 # /usr/bin/python # case "$1" in start) echo -n "Start: " su root -c "nohup python /home/pi/Running/temp2file.py &" echo "Done." ;; stop) echo -n "Stop: " killall -9 temp2file.py echo "Done." ;; *) echo "Usage: python { start | stop }" exit 1 esac exit 0
$chkconfig --add temp2file_luncher.sh
相关文章推荐
- 使用dos指令快速导出手机文件
- Linux学习笔记(8)之Shell编程入门--输入输出、引号
- shell脚本编程之数组以及为脚本使用选项
- Bash快速入门指南
- 企业shell编程基础问题解决实践
- Shell 编程快速入门
- Linux学习笔记(7) 之Shell变量
- 一些简单的shell脚本实例 转
- Shell: extract more from listener.log(分析监听日志)
- Linux shell实现Mysql异地备份数据库
- Linux使用Shell脚本实现ftp的自动上传下载
- Bash Shell 里的各种括号
- windows下练习linux shell
- shell中“2 > &1”的含义
- 简单的使用adb shell
- SHELL:Find Memory Usage In Linux (统计每个程序内存使用情况)
- 如何在shell脚本中导出数组供子进程使用
- 快速创建laravel项目shell脚本
- 几个小型 bash 例子
- 升级10.11后使用CocoaPod出现bash: pod: command not found 解决办法