BOYPT 288 天前 ♥ 1
在 systemd 里面,/etc/init.d 里面的文件已经不是在主要的服务启动方式,而是 systemd 的 service unit ,旧版的 init.d 文件通过 unit 配置文件里面类似下面这样的方式启动
[Service]
ExecStart=/etc/init.d/xxx start
ExecStop=/etc/init.d/xxx stop
脚本启动过程不是根据当前 shell 子进程启动的, stdin/out/err 都会被 systemd 接管,所以你看不到 echo 了。
/system/bin/screencap u:object_r:screencap_exec:s0
type screencap, domain,coredomain
type screencap_exec, exec_type,vendor_file_type,file_type
init_daemon_domain(screencap)
SystemProperties.set("ctl.start*", "xxx"),即可
这样 *** 作:1、copy一个vsftpd一个启动脚本到/etc/init.d/目录下,名字为vsftpd。(也可以自己书写一个启动脚本)
2、执行chkconfig
add
vsftpd(也可以加--level参数指定部分init)
3、就可以执行service
vsftpd
start
/stop了。
欢迎分享,转载请注明来源:内存溢出
评论列表(0条)