linux设置 开机自启 后台服务程序

一,脚本文件格式(PerformanceAPI.sh):

#!/bin/sh

cd /xxx/PerformanceLinux发布
dotnet PerformanceAPI.dll

 

二,权限设置:

1,给PerformanceAPI.sh文件设置权限:

chmod +x PerformanceAPI.sh

2,找到/etc/(rc.d/)rc.local该系统文件,在最末尾添加如下代码:

/xx/PerformanceAPI.sh

3,对rc.local系统文件设置权限:

chmod +x /etc/(rc.d/)rc.local

posted @ 2020-08-20 11:23  zwbsoft  阅读(691)  评论(0编辑  收藏  举报