How to fix "unexpected KEYWORD, expecting $end [type]"
This error is very common and simple which you might get when trying to restart ipsec services. Please follow the below solution in case you get this error Error: unexpected KEYWORD, expecting $end [type]