MatchbookLab / local-persist

Create named local volumes that persist in the location(s) you want
MIT License
851 stars 122 forks source link

bash: line 109: /etc/init/docker-volume-local-persist.conf: No such file or directory #62

Open ghost opened 6 years ago

ghost commented 6 years ago

I am running on a CentOS 7 VM.

[vagrant@www180 simpletextmsg]$ sudo curl -fsSL https://raw.githubusercontent.com/CWSpear/local-persist/master/scripts/install.sh | sudo bash -s -- --upstart Stopping docker-volume-local-persist service if running

Redirecting to /bin/systemctl stop docker-volume-local-persist.service Failed to stop docker-volume-local-persist.service: Unit docker-volume-local-persist.service not loaded. Downloading binary: From: https://github.com/CWSpear/local-persist/releases/download/v1.3.0/local-persist-linux-amd64 To: /usr/bin/docker-volume-local-persist Binary download

Downloading binary: From: https://raw.githubusercontent.com/CWSpear/local-persist/v1.3.0/init/upstart.conf To: /etc/init/docker-volume-local-persist.conf bash: line 109: /etc/init/docker-volume-local-persist.conf: No such file or directory [vagrant@www180 simpletextmsg]$

CWSpear commented 6 years ago

I admittedly have done almost no testing with CentOS (I strongly prefer Debian based OSes (Ubuntu 😄). It's been a while, so I may be making this up... but I think I did some testing with upstart in older versions of Ubuntu, and it was working. Not sure if I've tested with CentOS? It was kind of added in a best-effort manner.

It looks as tho it fails on this line:

 sudo curl -fLsS "$UPSTART_CONFIG_URL" > $UPSTART_CONFIG_DEST

Which expanding variables is:

sudo curl -fLsS "https://raw.githubusercontent.com/CWSpear/local-persist/v1.3.0/init/upstart.conf" > /etc/init/docker-volume-local-persist.conf

It sounds like maybe /etc/init doesn't exist? Is that not a thing on CentOS? That's where you're supposed to put upstart configs for Ubuntu so they get picked up and enacted (e.g. so this service gets restarted on system reboot). Where are you supposed to put them on CentOS?

ghost commented 6 years ago

CentOS doesn't use Upstart, so there isn't really an equivalent. I found a blog with some info on it at: https://unix.stackexchange.com/questions/283391/how-to-use-upstart-scripts-on-centos7#283394

That blog entry is from back before CentOS started using systemctl. So the info is a little dated, but it is the best think I found in the time I had today.

It will be a week or so before I have the chance to tinker with this, but when I get back to my home office and can work on this some more, I'll play around with it.

CWSpear commented 6 years ago

If they're not using Upstart, don't pass the --upstart flag... it uses Systemd by default.