emojied icon indicating copy to clipboard operation
emojied copied to clipboard

useless change

Open mathieu-aubin opened this issue 2 years ago • 2 comments

just for fun, seemed better plus i had time to kill heh

mathieu-aubin avatar Apr 30 '22 13:04 mathieu-aubin

Heyah! Thanks for the PR. If you have the time, could you explain this part to me, since I'm not so well-versed with bash?

cat <<- __EOF__ > $LOC
-----BEGIN CERTIFICATE-----
$CA_CERT
-----END CERTIFICATE-----
__EOF__

What does <<-__EOF__, or __EOF__ do?

sekunho avatar May 01 '22 07:05 sekunho

It's called a "HERE DOC"

The link i gave you doesnt show much to help grasp the concept but basically...

<<- Redirect until marker is reached (to terminal/file/pipe. etc..) __EOF__ Is the marker i used - could have used ENDCRT or whatever else "__EOF__" This would have not allowed variable substitution, which we wanted

there are alot more things with it that you could enjoy, maybe

mathieu-aubin avatar May 01 '22 10:05 mathieu-aubin

This isn't applicable anymore because I changed the deployment strategy. But thanks for the PR, and for the explanation! :pray:

sekunho avatar Oct 26 '22 13:10 sekunho

This isn't applicable anymore because I changed the deployment strategy. But thanks for the PR, and for the explanation! pray

I was wondering... i see 'run' file hasn't changed and curious about what you say is/has changed?

Its OKAY if the PR has no value to you, really. But im genuinely curiius about what you meant by the previous

take care!

mathieu-aubin avatar Oct 31 '22 14:10 mathieu-aubin

I'm happy to elaborate.

The script itself hasn't changed but I'm no longer using it. I created a systemd service which runs the binary directly, and it assumes that the CA certificate is already present, and will be provided for in the VPS that it's running in. Hence why there's no need for me to echo its contents into a file, which is what the script was responsible for in the first place.

  • Service template: https://github.com/sekunho/emojied/blob/main/nix/modules/services/emojied.nix#L76-L101
  • Usage: https://github.com/sekunho/dotfiles/blob/main/hosts/mew/configuration.nix#L66

sekunho avatar Oct 31 '22 14:10 sekunho