~ ll /etc/rc.d/rc.local -rwxr-xr-x 1 root root 810 Oct 9 09:30 /etc/rc.d/rc.local ~ cat /etc/rc.d/rc.local #!/bin/bash # THIS FILE IS ADDED FOR COMPATIBILITY PURPOSES # # It is highly advisable to create own systemd services or udev rules # to run scripts during boot instead of using this file. # # In contrast to previous versions due to parallel execution during boot # this script will NOT be run after all other services. # # Please note that you must run ‘chmod +x /etc/rc.d/rc.local‘ to ensure # that this script will be executed during boot. touch /var/lock/subsys/local #add_S by chunli, for autostart svnserve! while true do sleep 1 ps -ef > /tmp/tmp_svnserve cat /tmp/tmp_svnserve | grep ‘/usr/bin/svnserve -d‘ if [ $? -eq 0 ] then rm -rf /tmp/tmp_svnserve exit else /usr/bin/svnserve -d -r /home/svn/ fi done #add_E by chunli, for autostart svnserve! ~
时间: 2024-10-06 18:15:26