• [^] # Re: systemd a bon dos

    Posté par (site web personnel) . En réponse au journal et ce qui devait arriver, arriva .... Évalué à 5.

    Ici par exemple la façon dont c'est géré sous FreeBSD. Personnellement, ça ne me semble pas monstrueux.

    haproxy_reload()
    {
     # Check configuration file quietly first
     ${command} -q -c -f ${haproxy_config}
     if [ $? -ne 0 ]; then
    err 1 "Error found in ${haproxy_config} - not reloading current process!"
     fi
    rc_pid=$(check_pidfile ${haproxy_pidfile} ${command})
     if [ $rc_pid ]; then
     if [ $rc_force ]; then
     ${command} ${haproxy_flags} -st ${rc_pid}
     else
     ${command} ${haproxy_flags} -sf ${rc_pid}
     fi
     else
    err 1 "No process found. Maybe $command isn't running?"
     fi
    }