Stop nginx before APT upgrades run The 2019 Stack Overflow Developer Survey Results Are InDebian/Ubuntu: Enabling “dist-upgrade” behavior for unattended-upgrades?Unattended upgrades on Ubuntu, for *all* packages (from any repository)ubuntu server: SSH banner telling to update packages but nothing to updateWhen using a Ubuntu LTS release, ramifications of updating source listUbuntu unattended-upgrades stops apacheUsing puppet to ensure vagrant box is upgradedUbuntu 12.04 production server upgradefreeradius broken after apt-get updateUbuntu unattended upgrades not working on Ubuntu 14.04.4Ansbile playbook to apply only security updates with apt module

Realistic Alternatives to Dust: What Else Could Feed a Plankton Bloom?

I looked up a future colleague on linkedin before I started a job. I told my colleague about it and he seemed surprised. Should I apologize?

Why isn't airport relocation done gradually?

Falsification in Math vs Science

What is the motivation for a law requiring 2 parties to consent for recording a conversation

In microwave frequencies, do you use a circulator when you need a (near) perfect diode?

Evaluating number of iteration with a certain map with While

Could JWST stay at L2 "forever"?

What are the motivations for publishing new editions of an existing textbook, beyond new discoveries in a field?

Geography at the pixel level

Why don't Unix/Linux systems traverse through directories until they find the required version of a linked library?

How was Skylab's orbit inclination chosen?

Where does the "burst of radiance" from Holy Weapon originate?

Monty Hall variation

Does a dangling wire really electrocute me if I'm standing in water?

What tool would a Roman-age civilization have to grind silver and other metals into dust?

How to manage monthly salary

What is this 4-propeller plane?

What is the best strategy for white in this position?

How to change the limits of integration

Can I write a for loop that iterates over both collections and arrays?

How can I create a character who can assume the widest possible range of creature sizes?

Limit the amount of RAM Mathematica may access?

How to answer pointed "are you quitting" questioning when I don't want them to suspect



Stop nginx before APT upgrades run



The 2019 Stack Overflow Developer Survey Results Are InDebian/Ubuntu: Enabling “dist-upgrade” behavior for unattended-upgrades?Unattended upgrades on Ubuntu, for *all* packages (from any repository)ubuntu server: SSH banner telling to update packages but nothing to updateWhen using a Ubuntu LTS release, ramifications of updating source listUbuntu unattended-upgrades stops apacheUsing puppet to ensure vagrant box is upgradedUbuntu 12.04 production server upgradefreeradius broken after apt-get updateUbuntu unattended upgrades not working on Ubuntu 14.04.4Ansbile playbook to apply only security updates with apt module



.everyoneloves__top-leaderboard:empty,.everyoneloves__mid-leaderboard:empty,.everyoneloves__bot-mid-leaderboard:empty height:90px;width:728px;box-sizing:border-box;








0















How can I stop nginx before APT upgrades run in Ubuntu?



We run unattended upgrades on the server and in case there is any upgrade that will interfere with nginx I would like to stop the nginx service before doing upgrades. (E.g. an upgrade of nginx itself or something that could affect the network connectivity.)



After the upgrade has run I want nginx to launch again automatically.



This is one of multiple servers in a pool sitting behind a load balancer, so the user-facing service will not be affected by nginx being down. The web server is nginx 1.14.2 and the OS is Ubuntu 16.04.6 LTS.










share|improve this question






















  • If nginx is being upgraded, apt will stop and start it, itself. You probably don't need to do anything at all. Nobody else does.

    – Michael Hampton
    9 hours ago


















0















How can I stop nginx before APT upgrades run in Ubuntu?



We run unattended upgrades on the server and in case there is any upgrade that will interfere with nginx I would like to stop the nginx service before doing upgrades. (E.g. an upgrade of nginx itself or something that could affect the network connectivity.)



After the upgrade has run I want nginx to launch again automatically.



This is one of multiple servers in a pool sitting behind a load balancer, so the user-facing service will not be affected by nginx being down. The web server is nginx 1.14.2 and the OS is Ubuntu 16.04.6 LTS.










share|improve this question






















  • If nginx is being upgraded, apt will stop and start it, itself. You probably don't need to do anything at all. Nobody else does.

    – Michael Hampton
    9 hours ago














0












0








0








How can I stop nginx before APT upgrades run in Ubuntu?



We run unattended upgrades on the server and in case there is any upgrade that will interfere with nginx I would like to stop the nginx service before doing upgrades. (E.g. an upgrade of nginx itself or something that could affect the network connectivity.)



After the upgrade has run I want nginx to launch again automatically.



This is one of multiple servers in a pool sitting behind a load balancer, so the user-facing service will not be affected by nginx being down. The web server is nginx 1.14.2 and the OS is Ubuntu 16.04.6 LTS.










share|improve this question














How can I stop nginx before APT upgrades run in Ubuntu?



We run unattended upgrades on the server and in case there is any upgrade that will interfere with nginx I would like to stop the nginx service before doing upgrades. (E.g. an upgrade of nginx itself or something that could affect the network connectivity.)



After the upgrade has run I want nginx to launch again automatically.



This is one of multiple servers in a pool sitting behind a load balancer, so the user-facing service will not be affected by nginx being down. The web server is nginx 1.14.2 and the OS is Ubuntu 16.04.6 LTS.







ubuntu nginx apt ubuntu-16.04 unattended






share|improve this question













share|improve this question











share|improve this question




share|improve this question










asked 13 hours ago









Carl WinbäckCarl Winbäck

3716




3716












  • If nginx is being upgraded, apt will stop and start it, itself. You probably don't need to do anything at all. Nobody else does.

    – Michael Hampton
    9 hours ago


















  • If nginx is being upgraded, apt will stop and start it, itself. You probably don't need to do anything at all. Nobody else does.

    – Michael Hampton
    9 hours ago

















If nginx is being upgraded, apt will stop and start it, itself. You probably don't need to do anything at all. Nobody else does.

– Michael Hampton
9 hours ago






If nginx is being upgraded, apt will stop and start it, itself. You probably don't need to do anything at all. Nobody else does.

– Michael Hampton
9 hours ago











2 Answers
2






active

oldest

votes


















1














Adapting https://wiki.debian.org/ReadonlyRoot#Make_apt-get_remount_.2F_if_needed probably would work.



I'd give this variant a try:



DPkg 
Pre-Invoke "systemctl stop nginx"; ;
Post-Invoke "systemctl start nginx"; ;
;


Put this into a file and place it in /etc/apt.conf.d.



It will not check if the upgrade 'interferes' with your nginx intstallation, it stops it always.






share|improve this answer






























    -1














    You can stop Nginx using



    systemctl stop nginx


    And you can start it using



    systemctl start nginx





    share|improve this answer








    New contributor




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




















    • since the question involves "unattended upgrades", I doubt that a manual procedure such as this one is what is wanted here.

      – asdmin
      9 hours ago











    • he is asking if it is possible to stop nginx before upgrading

      – Diego Velez
      8 hours ago











    Your Answer








    StackExchange.ready(function()
    var channelOptions =
    tags: "".split(" "),
    id: "2"
    ;
    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: true,
    noModals: true,
    showLowRepImageUploadWarning: true,
    reputationToPostImages: 10,
    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/3.0/"u003ecc by-sa 3.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
    );



    );













    draft saved

    draft discarded


















    StackExchange.ready(
    function ()
    StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fserverfault.com%2fquestions%2f962196%2fstop-nginx-before-apt-upgrades-run%23new-answer', 'question_page');

    );

    Post as a guest















    Required, but never shown

























    2 Answers
    2






    active

    oldest

    votes








    2 Answers
    2






    active

    oldest

    votes









    active

    oldest

    votes






    active

    oldest

    votes









    1














    Adapting https://wiki.debian.org/ReadonlyRoot#Make_apt-get_remount_.2F_if_needed probably would work.



    I'd give this variant a try:



    DPkg 
    Pre-Invoke "systemctl stop nginx"; ;
    Post-Invoke "systemctl start nginx"; ;
    ;


    Put this into a file and place it in /etc/apt.conf.d.



    It will not check if the upgrade 'interferes' with your nginx intstallation, it stops it always.






    share|improve this answer



























      1














      Adapting https://wiki.debian.org/ReadonlyRoot#Make_apt-get_remount_.2F_if_needed probably would work.



      I'd give this variant a try:



      DPkg 
      Pre-Invoke "systemctl stop nginx"; ;
      Post-Invoke "systemctl start nginx"; ;
      ;


      Put this into a file and place it in /etc/apt.conf.d.



      It will not check if the upgrade 'interferes' with your nginx intstallation, it stops it always.






      share|improve this answer

























        1












        1








        1







        Adapting https://wiki.debian.org/ReadonlyRoot#Make_apt-get_remount_.2F_if_needed probably would work.



        I'd give this variant a try:



        DPkg 
        Pre-Invoke "systemctl stop nginx"; ;
        Post-Invoke "systemctl start nginx"; ;
        ;


        Put this into a file and place it in /etc/apt.conf.d.



        It will not check if the upgrade 'interferes' with your nginx intstallation, it stops it always.






        share|improve this answer













        Adapting https://wiki.debian.org/ReadonlyRoot#Make_apt-get_remount_.2F_if_needed probably would work.



        I'd give this variant a try:



        DPkg 
        Pre-Invoke "systemctl stop nginx"; ;
        Post-Invoke "systemctl start nginx"; ;
        ;


        Put this into a file and place it in /etc/apt.conf.d.



        It will not check if the upgrade 'interferes' with your nginx intstallation, it stops it always.







        share|improve this answer












        share|improve this answer



        share|improve this answer










        answered 9 hours ago









        asdminasdmin

        1,6821225




        1,6821225























            -1














            You can stop Nginx using



            systemctl stop nginx


            And you can start it using



            systemctl start nginx





            share|improve this answer








            New contributor




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




















            • since the question involves "unattended upgrades", I doubt that a manual procedure such as this one is what is wanted here.

              – asdmin
              9 hours ago











            • he is asking if it is possible to stop nginx before upgrading

              – Diego Velez
              8 hours ago















            -1














            You can stop Nginx using



            systemctl stop nginx


            And you can start it using



            systemctl start nginx





            share|improve this answer








            New contributor




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




















            • since the question involves "unattended upgrades", I doubt that a manual procedure such as this one is what is wanted here.

              – asdmin
              9 hours ago











            • he is asking if it is possible to stop nginx before upgrading

              – Diego Velez
              8 hours ago













            -1












            -1








            -1







            You can stop Nginx using



            systemctl stop nginx


            And you can start it using



            systemctl start nginx





            share|improve this answer








            New contributor




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










            You can stop Nginx using



            systemctl stop nginx


            And you can start it using



            systemctl start nginx






            share|improve this answer








            New contributor




            Seaskyways 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 answer



            share|improve this answer






            New contributor




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









            answered 13 hours ago









            SeaskywaysSeaskyways

            991




            991




            New contributor




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





            New contributor





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






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












            • since the question involves "unattended upgrades", I doubt that a manual procedure such as this one is what is wanted here.

              – asdmin
              9 hours ago











            • he is asking if it is possible to stop nginx before upgrading

              – Diego Velez
              8 hours ago

















            • since the question involves "unattended upgrades", I doubt that a manual procedure such as this one is what is wanted here.

              – asdmin
              9 hours ago











            • he is asking if it is possible to stop nginx before upgrading

              – Diego Velez
              8 hours ago
















            since the question involves "unattended upgrades", I doubt that a manual procedure such as this one is what is wanted here.

            – asdmin
            9 hours ago





            since the question involves "unattended upgrades", I doubt that a manual procedure such as this one is what is wanted here.

            – asdmin
            9 hours ago













            he is asking if it is possible to stop nginx before upgrading

            – Diego Velez
            8 hours ago





            he is asking if it is possible to stop nginx before upgrading

            – Diego Velez
            8 hours ago

















            draft saved

            draft discarded
















































            Thanks for contributing an answer to Server Fault!


            • 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%2fserverfault.com%2fquestions%2f962196%2fstop-nginx-before-apt-upgrades-run%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

            How to make RAID controller rescan devices The 2019 Stack Overflow Developer Survey Results Are InLSI MegaRAID SAS 9261-8i: Disk isn't recognized after replacementHow to monitor the hard disk status behind Dell PERC H710 Raid Controller with CentOS 6?LSI MegaRAID - Recreate missing RAID 1 arrayext. 2-bay USB-Drive with RAID: btrfs RAID vs built-in RAIDInvalid SAS topologyDoes enabling JBOD mode on LSI based controllers affect existing logical disks/arrays?Why is there a shift between the WWN reported from the controller and the Linux system?Optimal RAID 6+0 Setup for 40+ 4TB DisksAccidental SAS cable removal

            Unbreakable Formation vs. Cry of the Carnarium The 2019 Stack Overflow Developer Survey Results Are InCan an indestructible creature die by a combination of damage and -X/-X effects?Can a non-instant or sorcery ever have flashback?do creatures created after a “all creatures get -1/-1 until end of turn” instant get -1/-1 as well?What happens when I target an indestructible card with an “if that would die this turn, exile it instead” effect?Exalted trigger timingWhat happens when a non-token creature loses all abilities, is exiled, then returns?Does the spell cast with Yahenni's Expertise resolve before state-based effects are checked?What happens if Always Watching is destroyed mid-combat?MTG: Abilities lost when exiled?Under which controller does a stolen permanent come into play after being exiled?

            How can I have a shield and a way of attacking at distance at the same time? The 2019 Stack Overflow Developer Survey Results Are InDoes the Thrown property mean I can attack with my DEX?Is it possible to build a custom weapon, and if so, how will my character be able to use it?Can the Ghost Touch weapon property allow an attacker to perform incorporeal touch attacks?The DM allowed me to wield two shields, how can I get the most AC and HP, as a Bear Barbarian?Are there ways other than Kensei Weapons or Hex Warrior to use an ability other than STR for non-finesse melee weapons?Cheapest way to cast spells with sword and (heavy) shield?Is this homebrew “Throwing Weapons Master” feat balanced?Can Hexblade warlocks use a staff and shield?Are there any balance issues with allowing thrown Javelins to be drawn for free like ammunition weapons?Does an unattuned Frost Brand weapon still glow in freezing temperatures?Does a druid starting with a bow start with no arrows?Is it possible to build a custom weapon, and if so, how will my character be able to use it?