RangerMauve / dat-store

A CLI tool for backing up hyperdrive datasets
GNU Affero General Public License v3.0
59 stars 14 forks source link

Exec Line in SystemD #30

Closed DougAnderson444 closed 5 years ago

DougAnderson444 commented 5 years ago

Hi

I'm having a bit of trouble regarding this line for the SystemD setup:

ExecStart=/usr/bin/dat-store run-service

Question Part A) If one were to want to use

sudo dat-store install-service --allow-cors --expose-to-internet

...I understand we'd have to tweak the Exec line? Will changing run >to> install + [options] create issues? Any examples I've seen of this always ExecStart a bash script, is that the way to go on this one?

Question Part B) I'm also getting the good old "status=203/EXEC" error in my Digital Ocean VM when I try any of this, haven't quite figured out why, but apparently it has something to do with this line.

Any help/insight would be greatly appreesh! :dancer:

DougAnderson444 commented 5 years ago

Let me answer my own issue, ha! I did some more exploring: Added sudo (was giving the 203 error) and changed that ExecStart line to add the args:

ExecStart=/usr/bin/sudo dat-store run-service --allow-cors --expose-to-internet

Which works!! Yay!! Service runs, and I can POST to the server successfully.

THEN, I also tried replacing run-service with install-service:

ExecStart=/usr/bin/sudo dat-store install-service --allow-cors --expose-to-internet

...a service which seems to run fine, but when I did a POST to v1/dats/add/ the client failed to connect to the server. So the service appears to favour the run-service over the install-service.

RangerMauve commented 5 years ago

Sweet. Great to see it working for you! :D