我已经在 Kali 2.0 上安装并运行了 no-ip ddns,但是当尝试在启动时运行它时,我不知道该将 rcX.d 中的“X”改为什么?
配置文件说明:
If you want it to run automatically when the machine is booted, then
place the following script in your startup directory. (/etc/init.d/rcX.d
or /sbin/init.d/rcX.d or ???)
#######################################################
#! /bin/sh
# . /etc/rc.d/init.d/functions # uncomment/modify for your killproc
case "$1" in
start)
echo "Starting noip2."
/usr/local/bin/noip2
;;
stop)
echo -n "Shutting down noip2."
killproc -TERM /usr/local/bin/noip2
;;
*)
echo "Usage: $0 {start|stop}"
exit 1
esac
exit 0
#######################################################
Where the 'X' in rcX.d is the value obtained by running the
following command
grep initdefault /etc/inittab | awk -F: '{print $2}'
当我输入:
grep initdefault /etc/inittab | awk -F: '{print $2}'
我得到:
grep: /etc/inittab: No such file or directory
答案1
您可以使用命令行获取运行级别:
运行级别
但我想你想要:
更新-rc.d.....
答案2
由于某种原因,我对接受的答案有疑问,所以如果这对在 Raspberry Pi3 上运行 Debian 的任何人有帮助,我使用了这些说明并且它们似乎有效: