#pidfile — Public Fediverse posts
Live and recent posts from across the Fediverse tagged #pidfile, aggregated by home.social.
-
CW: CW Blogpost
Too Good To #014
In today’s installment:
- #dmesg from before the machine crashed
- #Kill process ID from #pidfile
- Let #systemd retry a task
- Set #MTU on #OpenVPN connections in #Networkmanager -
CW: CW Blogpost
Too Good To #014
In today’s installment:
- #dmesg from before the machine crashed
- #Kill process ID from #pidfile
- Let #systemd retry a task
- Set #MTU on #OpenVPN connections in #Networkmanager -
CW: CW Blogpost
Too Good To #014
In today’s installment:
- #dmesg from before the machine crashed
- #Kill process ID from #pidfile
- Let #systemd retry a task
- Set #MTU on #OpenVPN connections in #Networkmanager -
CW: CW Blogpost
Too Good To #014
In today’s installment:
- #dmesg from before the machine crashed
- #Kill process ID from #pidfile
- Let #systemd retry a task
- Set #MTU on #OpenVPN connections in #Networkmanager -
CW: CW Blogpost
Too Good To #014
In today’s installment:
- #dmesg from before the machine crashed
- #Kill process ID from #pidfile
- Let #systemd retry a task
- Set #MTU on #OpenVPN connections in #Networkmanager -
Oh clever! Here's my implementation:
if [[ -e $pidfile ]]
then
if (( $(wc -l < $pidfile) < 2 )) && grep -qE "^[0-9]+$" $pidfile
then
#pidfile format ok
pid=$(cat $pidfile)
if ps axo pid |grep -q "^ *$pid"
then
die "$progname already running on pid $pid"
else
#Pid not currently running
warn "Stale $pidfile found, deleting"
rm $pidfile || die "couldn't delete $pidfile"
...