Есть программа shoutcast ...
При установки программы, к ней прилагался скрипт запуска... тут все прекрасно
Есть вторая программа, которая должна загрузится после запуска shoutcast'а...
К сожалению, к ней скрипта запуска не прилагалось, так что я переписал скриптик от shoutcast'а
получилось такое:
Код: Выделить всё
#!/sbin/runscript
depend() {
need shoutcast
}
checkconfig() {
if ! [ -f /etc/icegenerator.conf ]; then
eerror "Can't find /etc/icegenerator.conf!"
return 1
fi
return 0
}
start() {
checkconfig || return 1
ebegin "Starting IceGen40"
start-stop-daemon --background --start --quiet --user shoutcast \
--group nogroup --make-pidfile --pidfile /var/run/icegen.pid \
--exec /usr/local/bin/icegenerator40 -- -f /etc/icegenerator.conf
eend $?
}
stop() {
ebegin "Stopping IceGen"
start-stop-daemon --stop --pidfile /var/run/icegen.pid --name icegenerator40
eend $?
}Почему-то после очередной перезагрузки сервера, программа icegenerator не встает
И ее нет в процессах... если руками написать /etc/init.d/icegenerator40 start
Получаю ответ "WARNING: icegenerator40 has already been started."...
Запускается только после
/etc/init.d/icegenerator40 stop
/etc/init.d/icegenerator40 start
icegenerator без ретранслятора shoutcast не работает.. потому, я предполагаю, что icegenerator раньше запускается чем shoutcast ...
Собственно, а почему? Т_Т Добавил же строчку "need shoutcast"
$ rc-update show
Код: Выделить всё
bootmisc | boot
checkfs | boot
checkroot | boot
clock | boot
exim | default
hostname | boot
icegenerator40 | default
iptables | default
local | default
localmount | boot
modules | boot
mysql | default
net.lo | boot
net.venet0 | default
nginx | default
php-fpm | default
pure-ftpd | default
rmnologin | boot
shoutcast | default
sshd | default
syslog-ng | default
vixie-cron | default
vzquota | defaultПодскажите пожалуйста, где я накосячил...
Добавлено
Вот, еще прикрепил скрипт запуска шоуткаста
Код: Выделить всё
#!/sbin/runscript
depend() {
need localmount
}
checkconfig() {
if ! [ -f /etc/shoutcast/sc_serv.conf ]; then
eerror "Can't find /etc/shoutcast/sc_serv.conf!"
return 1
fi
return 0
}
start() {
checkconfig || return 1
ebegin "Starting SHOUTcast"
start-stop-daemon --background --start --quiet --user shoutcast \
--group nogroup --make-pidfile --pidfile /var/run/sc_serv.pid \
--exec /opt/bin/sc_serv /etc/shoutcast/sc_serv.conf
eend $?
}
stop() {
ebegin "Stopping SHOUTcast"
start-stop-daemon --stop --pidfile /var/run/sc_serv.pid --name sc_serv
eend $?
}