Hi@all.
I am currently working on a better support for the SCTCS (torrent webif) under OpenWRT, so I changed a few things in it, to get it to work as desired. Now all works fine, torrent downloads are working, http daemon and sctcs daemon are starded, If I launch them manually.
So I had another idea. I have connected my external hdd to the usb - so I could use the red "SES" button on the WL-500GP to start/stop things using the hdd, so that I can attach/detach it, by pressing the button.
Now here's the script placed in /etc/hotplug.d/button/:
SERVICE='sctscd'
if [ "$BUTTON" = "ses" ] ; then
if [ "$ACTION" = "pressed" ] ; then
if ps ax | grep -v grep | grep $SERVICE > /dev/null
then
#SCTCS stoppen
/opt/etc/init.d/S90sctcs stop
#SWAP auf ICYBOX deaktivieren
swapoff /dev/scsi/host0/bus0/target0/lun0/part6
#ICYBOX unmounten
umount /dev/scsi/host0/bus0/target0/lun0/part5
sleep 3
else
#SWAP auf ICYBOX aktivieren
swapon /dev/scsi/host0/bus0/target0/lun0/part6
#ICYBOX nach /opt mounten
mount /dev/scsi/host0/bus0/target0/lun0/part5 /opt/
#SCTCS starten
httpd -c /opt/etc/sctcs_httpd.conf -p 8080 -h /opt/share/www
/opt/bin/sctcsd 1980 1 > /opt/share/www/sctcs.log &
sleep 3
fi
fi
fi
The script works, swap is activated/deactivated by pressing the button, also httpd and sctscd are started, but after starting httpd by this script, port 8080 is not accessible at all, httpd uses up to 99% of cpu. The normal webif (port 80) is still accessible, httpd is still working for port 80 - but not for 8080. I can't understand why manual launch works and launching it by this script is not working. The original httpd startscript supplied with OpenWRT starts the httpd in a similiar way.
Thx in advance.
fireandy
(Last edited by fireandy on 22 Jun 2007, 14:41)
