Sync gateway run as service for EC2 Linux Instance


#1

I’ve noticed my sync_gateway stops working after a while. I have to restart the instance and manually run sync_gateway again to start it.

I want to make sync_gateway into a service so that when the instance reboots, sync_gateway will run.
I have read about sync_gateway_service script, but that does not work for linux.

I’ve also been trying to use EC2’s User Data and this is my script, but it does not work and the instance wont start

#cloud-boothook
#!/bin/bash
/opt/couchbase-sync-gateway/bin/sync_gateway config.json

Thanks