Tiny Core Linux
Tiny Core Base => TCB Talk => Topic started by: manit123 on October 21, 2014, 12:25:34 AM
-
hi ,
I want to add entry in startup file so that 'mysql' service does not have to be explicitly selected from system tools > control panel > services .
How can I do that ?
-
Hi manit123
Go to /etc/init.d/services and take a look inside the mysql file to see what the start command looks like. Then add it to bootlocal.sh.
-
got it
tc@box:~$ cd /etc/init.d/services/
tc@box:/etc/init.d/services$ ls
crond dhcp mysql tftpd
tc@box:/etc/init.d/services$ cat mysql
#!/bin/sh
case "${1}" in
start)
su -c "cd /usr/local/mysql/bin;./mysqld_multi --log=/var/log/mysql/mysql.log start 1" - tc
;;
stop)
pkill mysqld
;;
status)
pidof mysqld
;;
*)
exit 1
;;
esac
-
echo "/etc/init.d/services/mysql start" >> bootlocal.sh
-
thanks centralware .
it is wise to run /etc/init.d/services/mysql with start option instead of adding 'su -c ...' .
Consider this thread solved.