![为什么 syndaemon 不能从 /etc/rc5.d 启动?](https://linux22.com/image/910856/%E4%B8%BA%E4%BB%80%E4%B9%88%20syndaemon%20%E4%B8%8D%E8%83%BD%E4%BB%8E%20%2Fetc%2Frc5.d%20%E5%90%AF%E5%8A%A8%EF%BC%9F.png)
我尝试在启动时启动 syndaemon,以便从登录窗口使用它。但什么都没起作用,所以我进行了越来越复杂的尝试,试图弄清楚到底发生了什么。这就是我现在的情况:
内容/etc/rc5.d/S99syndaemon
:
#!/bin/bash
/home/michael/syntest &
内容/home/michael/syntest
#!/bin/bash
echo "BEGIN" >> /home/michael/synlog
ps aux | grep [s]yndaemon
I=0
while [ "$?" = "1" ]; do
let I=$I+1
echo "TRY $I" >> /home/michael/synlog
syndaemon -d -i 0.5 -R >> /home/michael/synlog2 2>&1
sleep 1
ps aux | grep [s]yndaemon
done
ps aux | grep [s]yndaemon >> /home/michael/synlog
echo "END" >> /home/michael/synlog
权限:
ls -l /etc/rc5.d/S99syndaemon /etc/init.d/syndaemon /home/michael/syntest
-rwxr-xr-x 1 root root 37 Apr 22 20:59 /etc/init.d/syndaemon
lrwxrwxrwx 1 root root 19 Apr 22 18:24 /etc/rc5.d/S99syndaemon -> ../init.d/syndaemon
-rwxr-xr-x 1 root root 362 Apr 22 20:54 /home/michael/syntest
日志文件/home/michael/synlog
是不是正在创建。
我也尝试了这两个命令,但没有效果:
sudo update-rc.d syndaemon defaults
sudo service syndaemon start
为什么我的脚本无法运行?为什么 synclient 无法运行?