[CLC-506] [CLC-741] Add init.d script; push more logic into bash scripts
Merge pull request #480 from yuhunglin/CLC-506-c

[CLC-506] [CLC-741] Add init.d script; push more logic into bash scripts