rc.localファイルを使用して起動時に画面セッションを開始できないという問題があります。私が開始している特定の画面は、スピゴットミニクラフトサーバーです。rc.localから画面が開始しない
これは私のrc.localにファイルです:minecraftlogファイルは、各ブート時にアップデートを行います
#!/bin/bash
cd /home/spigot1_12
boot=$(date)
echo "Starting spigot server in screen \"minecraft\" @ $boot " >> /home/pi/Documents/minecraftlog
screen -S minecraft java -Xms512M -Xmx1008M -jar /home/spigot1_12/spigot-1.12.jar nogui
:これは(chmodのU + xは)startspigot.shスクリプトです
#!/bin/sh -e
#
# rc.local
#
# This script is executed at the end of each multiuser runlevel.
# Make sure that the script will "exit 0" on success or any other
# value on error.
#
# In order to enable or disable this script just change the execution
# bits.
#
# By default this script does nothing.
/home/pi/Documents/bootlog.sh
/home/spigot1_12/startspigot.sh
exit 0
スクリプトが実行されます。
"sudo sh startspigot.sh"コマンドを実行すると、すべて正常に動作します。画面が開始され、minecraftlogファイルが更新されます。しかし私は、両方とも「sudoの画面-ls」と「画面-ls」何のソケットを返さない、「sudoの画面が-ls」ブート時に
と再び画面を見つけることができます。
これを引き起こす原因は何ですか?唯一の2人のユーザは "pi"とrootです。
ありがとうございます!
スタックオーバーフローは、プログラミングや開発の質問のためのサイトです。この質問は、プログラミングや開発に関するものではないので、話題にはならないようです。ヘルプセンターの[ここではどのトピックを参照できますか](http://stackoverflow.com/help/on-topic)を参照してください。おそらく、[スーパーユーザ](http://superuser.com/)や[Unix&Linux Stack Exchange](http://unix.stackexchange.com/)の方が良いかもしれません。 – jww