hyperboria / bugs

Peer-to-peer IPv6 networking, secure and near-zero-conf.
154 stars 17 forks source link

Clean up systemd unit #59

Closed kyrias closed 8 years ago

ghost commented 9 years ago

Did these two break anything? This is just me wondering about the "why"

@shnatsel

Shnatsel commented 9 years ago

Why on earth would you drop config generation?

On af6b50c: it makes the output of "systemctl status" more readable. Please don't revert it.

kyrias commented 9 years ago

Because it has nothing to do in the systemd unit, it should have been done before trying to start the service. Doing it this way is really hacky and silly.

Also, makes it more readable? Not really?... All it does is duplicate cjdns in one more place.

kyrias commented 9 years ago

(Also, I just sent the PR because @cschmittiey told me to.)

Shnatsel commented 9 years ago

This way cjdns can work right out of the box - just install the package and you're ready to go. It also makes cjdns tolerant to deleting the config altogether if you've screwed it up (which is rather easy, since JSON is not exactly human-readable) - it will just generate a new one for you. The same is implemented in the Upstart script btw. This has proven to be a really useful feature.

If you prioritize "properness" and "having to do with things" over practicality, get @cjd to use/write a well-behaved build system and then we can talk about init scripts.

kyrias commented 9 years ago

This way cjdns can work right out of the box - just install the package and you're ready to go.

Why wouldn't it be able to without creating it in the service?

It also makes cjdns tolerant to deleting the config altogether if you've screwed it up (which is rather easy, since JSON is not exactly human-readable) - it will just generate a new one for you. The same is implemented in the Upstart script btw.

if you screw up you should know about it and be able to re-gen it yourself either way, so I don't see your point at all.

This has proven to be a really useful feature.

Proven by what and whom?

If you prioritize "properness" and "having to do with things" over practicality, get @cjd to use/write a well-behaved build system and then we can talk about init scripts.

Completely non-sequitur.

Kubuxu commented 8 years ago

Current regeneration is also problematic in case of symlinks, in some way my symlinked config was overwritten by one regenerated. Fortunately I had a backup.

Shnatsel commented 8 years ago

That's nasty and should definitely be fixed in the script.

Kubuxu commented 8 years ago

I am not sure how it exactly happened but for sure it wasn't launching (it was erring in internal bash script) with symlinked config.

kpcyrd commented 8 years ago

@Kubuxu it uses test -e which follows the symlink and would return "already exists" if there's a file that could be overwritten.

af6b50ca05ebbdf2251c2be8701608f2de73f453 added a format which looks like this:

Sep 23 22:55:51 localhost systemd[1]: Starting cjdns: routing engine designed for security, scalability, speed and ease of use...

which I think is perfectly fine.

I agree on ExecStartPre=, though. I think the package manager should do that.