我试图弄清楚如何在启动时运行命令,就像我将其输入控制台一样。我在 Raspberry Pi 上使用 Rasbian,但我认为这个问题对于 Debian 来说通常是相同的。我尝试运行的命令是:
sudo screen mono server.exe
我尝试了以下解决方案,但由于我刚刚开始使用Linux,所以我不确定这是否正确。
#! /bin/sh
# /etc/init.d/server
### BEGIN INIT INFO
# Provides: server
# Required-Start: $remote_fs $syslog
# Required-Stop: $remote_fs $syslog
# Default-Start: 2 3 4 5
# Default-Stop: 0 1 6
# Short-Description: Simple script to start a program at boot
# Description: ..
### END INIT INFO
# If you want a command to always run, put it here
sudo screen mono server.exe
exit 0
Simple
Run cd ~
然后编辑.profile
在底部,放任何你想要的东西。
本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系:hwhale#tublm.com(使用前将#替换为@)