Added web/socket logic to manual script