我已经尝试将此添加到我的crontab:
@reboot/root/startup
"启动"文件:
#!/bin/sh
svnserve -d -r /root/svnrepos/mainres
svnserve -d -r /root/svnrepos/mapres --listen-port=3691
screen -S mta ./mtaserver/mta-server > log1
screen -S mapmta ./mapserver/mta-server > log2
exit 0
Run Code Online (Sandbox Code Playgroud)
现在svnserve命令运行正常.问题在于screen命令.
log1和log2文件具有相同的内容:必须连接到终端.
我要做的是在启动时启动2个可执行文件,然后再有办法访问它们.
有没有办法做到这一点?