cat test
#!/bin/bash
# chkconfig: - 90 10
# description: just a test
echo "Hello,$1"
mv test /etc/init.d/
chmod +x /etc/init.d/test
chkconfig --add test
service test start //可以看到Hello,start表示成功
cat test
#!/bin/bash
# chkconfig: - 90 10
# description: just a test
echo "Hello,$1"
mv test /etc/init.d/
chmod +x /etc/init.d/test
chkconfig --add test
service test start //可以看到Hello,start表示成功