我喜歡在啓動時啓動我的Raspberry Pi上的Siriproxy服務器。我在終端輸入如何在啓動時運行Linux終端命令
cd siriproxy
rvmsudo siriproxy server
開始Siriproxy。 有沒有辦法在啓動時運行命令?
非常感謝,
大衛
這是我編輯的腳本:
#!/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.
# Print the IP address
_IP=$(hostname -I) || true
if [ "$_IP" ]; then
printf "My IP address is %s\n" "$_IP"
fi
#I added this line
/home/pi/siriproxy server
exit 0
/etc/init.d/cron start
考慮'的/ etc/init.d'創建一個腳本。 – devnull 2013-05-07 13:49:09
@devnull不,因爲我不知道該怎麼做,而且我是Linux新手。 – 2013-05-07 14:25:36