Restart and write config on deploy