2016-12-02 50 views
-1

我要开始在命令行一个简单的脚本时,所有服务的开始(比如图片)总是自动很简单,也开始C++程序./programLinux的启动script.sh开机时结束

#!/bin/sh 
/path/to/my/script.sh 

我需要这与像

<!DOCTYPE html> 
<html> 
<head> 
<meta charset="utf-8"> 
<meta http-equiv="X-UA-Compatible" content="IE=edge"> 
<title></title> 

</head> 
<body> 
anoter简单的程序连接
<script type="text/javascript" src="jquery.js"></script> 
<script type="text/javascript"> 
    $(document).ready(function() { 
     setInterval(function() { 
      $('#show').load('data.php') 
     }, 3000); 
    }); 


</script> 

回答

1

要在开机启动程序,您可以修改并在/etc/rc.local

例如添加一行

/path/to/my/script.sh & 
+0

还有什么样的scrpit?也是一个C++执行? ./myProgram? –

+0

如果您想启动程序而不是脚本,请获取程序的完整路径(通过'pwd'),然后将'/ path/to/my/program&'行放入'/ etc/rc中。 local' – Chiu