paulgorman.org

< ^ txt

Thu Aug 4 08:11:02 EDT 2016 Slept from ten-something until around seven. Woke briefly around five. I feel rested, and in a generally good mood. Sunny. High of ninety-one. Goals: Work: - Review invoices Done. - Continue work on emergency maintenance call system A bit, but spent some time refining process control for Asterisk. So... did systemd start Asterisk and then kill it because one of the ExecStartPost commands failed?! I don't think that should be the case, at least not with 'Type=simple'. Still not sure, but I need to set 'PermissionsStartOnly=true' or else ExecStartPre and ExecStopPost commands run as the user set by 'User='. Man, just the other day I was thinking that whatever other philosophical problems I have with systemd, the unit file syntax is nice. Unfortunately, the simple syntax doesn't always make the behavior obvious. Short walk at lunch. Hmm. ':set cursorline' is sort of nice for reading some stuff in vim. It underlines the current line. Started writing this up (to match my Python and Ruby "-as-glue-language" notes): https://paulgorman.org/technical/perl-as-a-glue-language.txt Home: - Talk to dad or Yvonne re dinner tonight Done. Talked to Yvonne. Tonight may not be good for them. She'll call me if things change. Yvonne called me back. Dinner is on. Went over to dad's from around six to nine. Had dinner: fish sandwiches, corn on the cob, macaroni salad, etc. Sat in the garden with dad, Yvonne, Kate, Ryan, and Isla. Dad looked pretty good, maybe even a little better than last time. Some months ago, I had emailed dad samples of a bunch of amateur OSR artists. He didn't think much of them. He pulled a book of Heath Robinson off the shelf, and said "now there's a real D&D artist". True enough. There's no knocking the early twentieth century illustrators. Took a half hour walk after I got back from dad's. Lot of fireflies seen, lots of cricket, frogs, cicadas heard. Still hot out, but enjoyable nonetheless. Remoted into work, and spent a few minutes testing my changes to the Asterisk unit file. Well... Asterisk is properly started and stoped, but the pre and post exec actions aren't working. Can those not handle shell redirects? Try `bash -c 'echo foo | mail -s foo root'`? https://www.freedesktop.org/software/systemd/man/systemd.service.html "This syntax is intended to be very similar to shell syntax, but only the meta-characters and expansions described in the following paragraphs are understood. Specifically, redirection using "<", "<<", ">", and ">>", pipes using "|", running programs in the background using "&", and other elements of shell syntax are not supported." ExecStopPost=/bin/sh -c 'echo "The Asterisk service on gab stopped." | mail -s "Asterisk service stopped" root' Yeah, that did it. Fixed. Breakfast: spinach, carrots, coffee with half-and-half Lunch: McDonalds Dinner: fish sandwich and corn on the cob

< ^ txt