Skip to content

Instantly share code, notes, and snippets.

View mjml's full-sized avatar
🤯
Working on STM32 / USB / Virtual Machines

MJ mjml

🤯
Working on STM32 / USB / Virtual Machines
View GitHub Profile
@mjml
mjml / gist:ed26eed51cc33ec54e53b73cc74f88e4
Last active October 12, 2021 19:42
Continuously monitor a systemd service
#!/bin/bash
cd /root/.maint
# Remove any pre-existing pipe if one exists
if [[ -e jcpipe ]]; then
rm -f jcpipe
fi
mkfifo jcpipe
my $homedir=%*ENV{'HOME'};
#my @subdirs = ("ee", "math", "eng");
my @subdirs = ( @*ARGS[0] );
my ($srcbase, $dtbase, $ddbase, $menubase) = ("/read/",
"/.local/share/applications/mylibrary/",
"/.local/share/desktop-directories/mylibrary/",
"/.config/menus/").map: $homedir ~ * ~ "placeholder";