Mil*_*ays 7 startup logs services
有没有办法在 /etc/init.d 中获取启动进程的日志?
我正在运行 Raspbian (Debian Wheezy)。
dmesg
显示引导日志,但还不够。
前段时间加了个启动脚本,tightvncserver
看到别人贴过类似的脚本。
这似乎永远不会开始,但我不知道为什么。我想看看是否有任何错误生成。
#!/bin/sh
### BEGIN INIT INFO
# Provides: tightvncserver
# Required-Start: $local_fs
# Required-Stop: $local_fs
# Default-Start: 2 3 4 5
# Default-Stop: 0 1 6
# Short-Description: Start/stop tightvncserver
### END INIT INFO
# More details see:
# http://www.penguintutor.com/linux/tightvnc
### Customize this entry
# Set the USER variable to the name of the user to start tightvncserver under
export USER='pi'
### End customization required
eval cd ~$USER
case "$1" in
start)
su $USER -c '/usr/bin/tightvncserver :1'
echo "Starting TightVNC server for $USER "
;;
stop)
pkill Xtightvnc
echo "Tightvncserver stopped"
;;
*)
echo "Usage: /etc/init.d/tightvncserver {start|stop}"
exit 1
;;
esac
exit 0
Run Code Online (Sandbox Code Playgroud)
service tightvncserver start
在运行的系统中尝试(以root身份),它可能会给你一些提示。如果没有,您最好的选择是使用串行控制台并记录其输出。如果这不可能,bootlogd或许可以帮助您。如果你什么也没得到,也许你忘记激活你的初始化脚本。的输出是什么
$ ls /etc/rc?.d/*tightvncserver
Run Code Online (Sandbox Code Playgroud)
命令?如果没有,请尝试(以 root 身份)
# update-rc.d tightvncserver defaults
Run Code Online (Sandbox Code Playgroud)
归档时间: |
|
查看次数: |
21330 次 |
最近记录: |