Modify castd script.

Signed-off-by: Manson Li <manson.li@matchstick.tv>