Patch service fileMake systemd reload only single openvpn process and not the whole groupAdding a systemd...

Is it allowed to let the engine of an aircraft idle without a pilot in the plane. (For both helicopters and aeroplanes)

Can Microsoft employees see my data?

2000's spooky show with a group of teens telling spooky stories in the woods

In this day and age should the definition / categorisation of erotica be revised?

Sum of all digits in a string

On notice period - coworker I need to train is giving me the silent treatment

How does a ball bearing door hinge work?

How can I seal 8 inch round holes in my siding?

ISO how high is right at night

Why did my relationship with my wife go down by two hearts?

What happens when supercritical fuel tanks deplete below critical point?

Does code obfuscation give any measurable security benefit?

Stare long enough and you will have found the answer

How can I communicate feelings to players without impacting their agency?

Is it unusual that English uses possessive for past tense?

Digit Date Range

Prisoner's dilemma formulation for children

My company wants to hide the fact that I'm leaving by announcing I'm on a sick leave

What is gerrymandering called if it's not the result of redrawing districts?

If I did not sign promotion bonus document, my career would be over. Is this duress?

I run daily 5kms but I cant seem to improve stamina when playing soccer

Should all required user story assets be available before sizing a story or starting the sprint?

First author doesn't want a co-author to read the whole paper

How are Aircraft Noses Designed?



Patch service file


Make systemd reload only single openvpn process and not the whole groupAdding a systemd .service (Debian)mysql service restarted during user being connected lead to failing serviceWhy is systemd stopping service immediately after it is started?Systemd irregular timing issueInstruct to execute an unit after completing another unit successfullysystemd: finish the execution of custom shell script before starting nginxStopping systemd unit together with another. Starting worksSystemd Unit File - WantedBy and After






.everyoneloves__top-leaderboard:empty,.everyoneloves__mid-leaderboard:empty,.everyoneloves__bot-mid-leaderboard:empty{
margin-bottom:0;
}








1

















I want to add MY_SERVICE@SOME_SERVICE.service to OnFailure= and make it persistent. For example, in /lib/systemd/system/apache2.service, I want to have the line OnFailure=MY_SERVICE@apache2.service in the [Unit] section.



This can be done with systemctl edit. However, if and when apache2.service contains an OnFailure= by default (for example, after updating to a newer version), it would be overriden with my changes. I want both the default OnFailure= and my own OnFailure= (for example, OnFailure=default.service MY_SERVICE@apache2.service).



How can I achieve this?





Default contents of /lib/systemd/system/apache2.service



[Unit]
Description=The Apache HTTP Server
After=network.target remote-fs.target nss-lookup.target

[Service]
Type=forking
Environment=APACHE_STARTED_BY_SYSTEMD=true
ExecStart=/usr/sbin/apachectl start
ExecStop=/usr/sbin/apachectl stop
ExecReload=/usr/sbin/apachectl graceful
PrivateTmp=true
Restart=on-abort

[Install]
WantedBy=multi-user.target


Contents of /lib/systemd/system/apache2.service after systemctl edit (added line 4)



[Unit]
Description=The Apache HTTP Server
After=network.target remote-fs.target nss-lookup.target
OnFailure=MY_SERVICE@apache2.service

[Service]
Type=forking
Environment=APACHE_STARTED_BY_SYSTEMD=true
ExecStart=/usr/sbin/apachectl start
ExecStop=/usr/sbin/apachectl stop
ExecReload=/usr/sbin/apachectl graceful
PrivateTmp=true
Restart=on-abort

[Install]
WantedBy=multi-user.target


Contents of /lib/systemd/system/apache2.service after update with new default service for apache2 in OnFailure= (modified line 4)



[Unit]
Description=The Apache HTTP Server
After=network.target remote-fs.target nss-lookup.target
OnFailure=default.service MY_SERVICE@apache2.service

[Service]
Type=forking
Environment=APACHE_STARTED_BY_SYSTEMD=true
ExecStart=/usr/sbin/apachectl start
ExecStop=/usr/sbin/apachectl stop
ExecReload=/usr/sbin/apachectl graceful
PrivateTmp=true
Restart=on-abort

[Install]
WantedBy=multi-user.target









share|improve this question







New contributor



user376663 is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.






























    1

















    I want to add MY_SERVICE@SOME_SERVICE.service to OnFailure= and make it persistent. For example, in /lib/systemd/system/apache2.service, I want to have the line OnFailure=MY_SERVICE@apache2.service in the [Unit] section.



    This can be done with systemctl edit. However, if and when apache2.service contains an OnFailure= by default (for example, after updating to a newer version), it would be overriden with my changes. I want both the default OnFailure= and my own OnFailure= (for example, OnFailure=default.service MY_SERVICE@apache2.service).



    How can I achieve this?





    Default contents of /lib/systemd/system/apache2.service



    [Unit]
    Description=The Apache HTTP Server
    After=network.target remote-fs.target nss-lookup.target

    [Service]
    Type=forking
    Environment=APACHE_STARTED_BY_SYSTEMD=true
    ExecStart=/usr/sbin/apachectl start
    ExecStop=/usr/sbin/apachectl stop
    ExecReload=/usr/sbin/apachectl graceful
    PrivateTmp=true
    Restart=on-abort

    [Install]
    WantedBy=multi-user.target


    Contents of /lib/systemd/system/apache2.service after systemctl edit (added line 4)



    [Unit]
    Description=The Apache HTTP Server
    After=network.target remote-fs.target nss-lookup.target
    OnFailure=MY_SERVICE@apache2.service

    [Service]
    Type=forking
    Environment=APACHE_STARTED_BY_SYSTEMD=true
    ExecStart=/usr/sbin/apachectl start
    ExecStop=/usr/sbin/apachectl stop
    ExecReload=/usr/sbin/apachectl graceful
    PrivateTmp=true
    Restart=on-abort

    [Install]
    WantedBy=multi-user.target


    Contents of /lib/systemd/system/apache2.service after update with new default service for apache2 in OnFailure= (modified line 4)



    [Unit]
    Description=The Apache HTTP Server
    After=network.target remote-fs.target nss-lookup.target
    OnFailure=default.service MY_SERVICE@apache2.service

    [Service]
    Type=forking
    Environment=APACHE_STARTED_BY_SYSTEMD=true
    ExecStart=/usr/sbin/apachectl start
    ExecStop=/usr/sbin/apachectl stop
    ExecReload=/usr/sbin/apachectl graceful
    PrivateTmp=true
    Restart=on-abort

    [Install]
    WantedBy=multi-user.target









    share|improve this question







    New contributor



    user376663 is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
    Check out our Code of Conduct.


























      1












      1








      1








      I want to add MY_SERVICE@SOME_SERVICE.service to OnFailure= and make it persistent. For example, in /lib/systemd/system/apache2.service, I want to have the line OnFailure=MY_SERVICE@apache2.service in the [Unit] section.



      This can be done with systemctl edit. However, if and when apache2.service contains an OnFailure= by default (for example, after updating to a newer version), it would be overriden with my changes. I want both the default OnFailure= and my own OnFailure= (for example, OnFailure=default.service MY_SERVICE@apache2.service).



      How can I achieve this?





      Default contents of /lib/systemd/system/apache2.service



      [Unit]
      Description=The Apache HTTP Server
      After=network.target remote-fs.target nss-lookup.target

      [Service]
      Type=forking
      Environment=APACHE_STARTED_BY_SYSTEMD=true
      ExecStart=/usr/sbin/apachectl start
      ExecStop=/usr/sbin/apachectl stop
      ExecReload=/usr/sbin/apachectl graceful
      PrivateTmp=true
      Restart=on-abort

      [Install]
      WantedBy=multi-user.target


      Contents of /lib/systemd/system/apache2.service after systemctl edit (added line 4)



      [Unit]
      Description=The Apache HTTP Server
      After=network.target remote-fs.target nss-lookup.target
      OnFailure=MY_SERVICE@apache2.service

      [Service]
      Type=forking
      Environment=APACHE_STARTED_BY_SYSTEMD=true
      ExecStart=/usr/sbin/apachectl start
      ExecStop=/usr/sbin/apachectl stop
      ExecReload=/usr/sbin/apachectl graceful
      PrivateTmp=true
      Restart=on-abort

      [Install]
      WantedBy=multi-user.target


      Contents of /lib/systemd/system/apache2.service after update with new default service for apache2 in OnFailure= (modified line 4)



      [Unit]
      Description=The Apache HTTP Server
      After=network.target remote-fs.target nss-lookup.target
      OnFailure=default.service MY_SERVICE@apache2.service

      [Service]
      Type=forking
      Environment=APACHE_STARTED_BY_SYSTEMD=true
      ExecStart=/usr/sbin/apachectl start
      ExecStop=/usr/sbin/apachectl stop
      ExecReload=/usr/sbin/apachectl graceful
      PrivateTmp=true
      Restart=on-abort

      [Install]
      WantedBy=multi-user.target









      share|improve this question







      New contributor



      user376663 is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
      Check out our Code of Conduct.












      I want to add MY_SERVICE@SOME_SERVICE.service to OnFailure= and make it persistent. For example, in /lib/systemd/system/apache2.service, I want to have the line OnFailure=MY_SERVICE@apache2.service in the [Unit] section.



      This can be done with systemctl edit. However, if and when apache2.service contains an OnFailure= by default (for example, after updating to a newer version), it would be overriden with my changes. I want both the default OnFailure= and my own OnFailure= (for example, OnFailure=default.service MY_SERVICE@apache2.service).



      How can I achieve this?





      Default contents of /lib/systemd/system/apache2.service



      [Unit]
      Description=The Apache HTTP Server
      After=network.target remote-fs.target nss-lookup.target

      [Service]
      Type=forking
      Environment=APACHE_STARTED_BY_SYSTEMD=true
      ExecStart=/usr/sbin/apachectl start
      ExecStop=/usr/sbin/apachectl stop
      ExecReload=/usr/sbin/apachectl graceful
      PrivateTmp=true
      Restart=on-abort

      [Install]
      WantedBy=multi-user.target


      Contents of /lib/systemd/system/apache2.service after systemctl edit (added line 4)



      [Unit]
      Description=The Apache HTTP Server
      After=network.target remote-fs.target nss-lookup.target
      OnFailure=MY_SERVICE@apache2.service

      [Service]
      Type=forking
      Environment=APACHE_STARTED_BY_SYSTEMD=true
      ExecStart=/usr/sbin/apachectl start
      ExecStop=/usr/sbin/apachectl stop
      ExecReload=/usr/sbin/apachectl graceful
      PrivateTmp=true
      Restart=on-abort

      [Install]
      WantedBy=multi-user.target


      Contents of /lib/systemd/system/apache2.service after update with new default service for apache2 in OnFailure= (modified line 4)



      [Unit]
      Description=The Apache HTTP Server
      After=network.target remote-fs.target nss-lookup.target
      OnFailure=default.service MY_SERVICE@apache2.service

      [Service]
      Type=forking
      Environment=APACHE_STARTED_BY_SYSTEMD=true
      ExecStart=/usr/sbin/apachectl start
      ExecStop=/usr/sbin/apachectl stop
      ExecReload=/usr/sbin/apachectl graceful
      PrivateTmp=true
      Restart=on-abort

      [Install]
      WantedBy=multi-user.target






      linux systemd services






      share|improve this question







      New contributor



      user376663 is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
      Check out our Code of Conduct.











      share|improve this question







      New contributor



      user376663 is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
      Check out our Code of Conduct.








      share|improve this question




      share|improve this question






      New contributor



      user376663 is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
      Check out our Code of Conduct.








      asked 2 hours ago









      user376663user376663

      61 bronze badge




      61 bronze badge




      New contributor



      user376663 is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
      Check out our Code of Conduct.




      New contributor




      user376663 is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
      Check out our Code of Conduct.



























          0






          active

          oldest

          votes













          Your Answer








          StackExchange.ready(function() {
          var channelOptions = {
          tags: "".split(" "),
          id: "106"
          };
          initTagRenderer("".split(" "), "".split(" "), channelOptions);

          StackExchange.using("externalEditor", function() {
          // Have to fire editor after snippets, if snippets enabled
          if (StackExchange.settings.snippets.snippetsEnabled) {
          StackExchange.using("snippets", function() {
          createEditor();
          });
          }
          else {
          createEditor();
          }
          });

          function createEditor() {
          StackExchange.prepareEditor({
          heartbeatType: 'answer',
          autoActivateHeartbeat: false,
          convertImagesToLinks: false,
          noModals: true,
          showLowRepImageUploadWarning: true,
          reputationToPostImages: null,
          bindNavPrevention: true,
          postfix: "",
          imageUploader: {
          brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
          contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/4.0/"u003ecc by-sa 4.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
          allowUrls: true
          },
          onDemand: true,
          discardSelector: ".discard-answer"
          ,immediatelyShowMarkdownHelp:true
          });


          }
          });







          user376663 is a new contributor. Be nice, and check out our Code of Conduct.










          draft saved

          draft discarded
















          StackExchange.ready(
          function () {
          StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2funix.stackexchange.com%2fquestions%2f546222%2fpatch-service-file%23new-answer', 'question_page');
          }
          );

          Post as a guest















          Required, but never shown


























          0






          active

          oldest

          votes








          0






          active

          oldest

          votes









          active

          oldest

          votes






          active

          oldest

          votes









          user376663 is a new contributor. Be nice, and check out our Code of Conduct.










          draft saved

          draft discarded

















          user376663 is a new contributor. Be nice, and check out our Code of Conduct.













          user376663 is a new contributor. Be nice, and check out our Code of Conduct.












          user376663 is a new contributor. Be nice, and check out our Code of Conduct.
















          Thanks for contributing an answer to Unix & Linux Stack Exchange!


          • Please be sure to answer the question. Provide details and share your research!

          But avoid



          • Asking for help, clarification, or responding to other answers.

          • Making statements based on opinion; back them up with references or personal experience.


          To learn more, see our tips on writing great answers.




          draft saved


          draft discarded














          StackExchange.ready(
          function () {
          StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2funix.stackexchange.com%2fquestions%2f546222%2fpatch-service-file%23new-answer', 'question_page');
          }
          );

          Post as a guest















          Required, but never shown





















































          Required, but never shown














          Required, but never shown












          Required, but never shown







          Required, but never shown

































          Required, but never shown














          Required, but never shown












          Required, but never shown







          Required, but never shown









          Popular posts from this blog

          Hudson River Historic District Contents Geography History The district today Aesthetics Cultural...

          The number designs the writing. Feandra Aversely Definition: The act of ingrafting a sprig or shoot of one...

          Ayherre Geografie Demografie Externe links Navigatiemenu43° 23′ NB, 1° 15′ WL43° 23′ NB, 1°...