Re: [systemd-devel] At wits end... need to execute a script prior to anything getting killed/changed on reboot/shutdown

2019-01-26 Thread Andrei Borzenkov
17.01.2019 21:03, Christopher Cox пишет: > On 1/17/19 11:59 AM, Lennart Poettering wrote: >> On Do, 17.01.19 11:17, Christopher Cox (c...@endlessnow.com) wrote: >> > [Install] > WantedBy=multi-user.target > > In my case, my script rolls through the currently running > processes,

Re: [systemd-devel] At wits end... need to execute a script prior to anything getting killed/changed on reboot/shutdown

2019-01-17 Thread Christopher Cox
On 1/17/19 2:42 PM, Lennart Poettering wrote: On Do, 17.01.19 14:35, Christopher Cox (c...@endlessnow.com) wrote: On 1/17/19 2:25 PM, Lennart Poettering wrote: On Do, 17.01.19 12:38, Christopher Cox (c...@endlessnow.com) wrote: it defaults to YES and the whole discussions as that changed whe

Re: [systemd-devel] At wits end... need to execute a script prior to anything getting killed/changed on reboot/shutdown

2019-01-17 Thread Lennart Poettering
On Do, 17.01.19 14:35, Christopher Cox (c...@endlessnow.com) wrote: > On 1/17/19 2:25 PM, Lennart Poettering wrote: > > On Do, 17.01.19 12:38, Christopher Cox (c...@endlessnow.com) wrote: > > > > > > > it defaults to YES and the whole discussions as that changed where > > > > > about > > > > > no

Re: [systemd-devel] At wits end... need to execute a script prior to anything getting killed/changed on reboot/shutdown

2019-01-17 Thread Christopher Cox
On 1/17/19 2:25 PM, Lennart Poettering wrote: On Do, 17.01.19 12:38, Christopher Cox (c...@endlessnow.com) wrote: it defaults to YES and the whole discussions as that changed where about nohup'd processes long ago Changing it to "no"... I'll let you know if this fixes things or not. Actual

Re: [systemd-devel] At wits end... need to execute a script prior to anything getting killed/changed on reboot/shutdown

2019-01-17 Thread Lennart Poettering
On Do, 17.01.19 12:38, Christopher Cox (c...@endlessnow.com) wrote: > > > it defaults to YES and the whole discussions as that changed where about > > > nohup'd processes long ago > > > > Changing it to "no"... I'll let you know if this fixes things or not. > > > > Actually, as it turns out the no

Re: [systemd-devel] At wits end... need to execute a script prior to anything getting killed/changed on reboot/shutdown

2019-01-17 Thread Christopher Cox
On 1/17/19 12:09 PM, Christopher Cox wrote: On 1/17/19 11:54 AM, Reindl Harald wrote: Am 17.01.19 um 18:51 schrieb Christopher Cox: On 1/17/19 11:21 AM, Reindl Harald wrote: Am 17.01.19 um 18:17 schrieb Christopher Cox: On 1/17/19 11:01 AM, Lennart Poettering wrote: Hmm, what kind of proces

Re: [systemd-devel] At wits end... need to execute a script prior to anything getting killed/changed on reboot/shutdown

2019-01-17 Thread Christopher Cox
On 1/17/19 11:54 AM, Reindl Harald wrote: Am 17.01.19 um 18:51 schrieb Christopher Cox: On 1/17/19 11:21 AM, Reindl Harald wrote: Am 17.01.19 um 18:17 schrieb Christopher Cox: On 1/17/19 11:01 AM, Lennart Poettering wrote: Hmm, what kind of processes are you missing? user session stuff? How

Re: [systemd-devel] At wits end... need to execute a script prior to anything getting killed/changed on reboot/shutdown

2019-01-17 Thread Mike Gilbert
On Thu, Jan 17, 2019 at 12:54 PM Reindl Harald wrote: > > > > Am 17.01.19 um 18:51 schrieb Christopher Cox: > > On 1/17/19 11:21 AM, Reindl Harald wrote: > >> > >> Am 17.01.19 um 18:17 schrieb Christopher Cox: > >>> On 1/17/19 11:01 AM, Lennart Poettering wrote: > Hmm, what kind of processes

Re: [systemd-devel] At wits end... need to execute a script prior to anything getting killed/changed on reboot/shutdown

2019-01-17 Thread Christopher Cox
On 1/17/19 11:59 AM, Lennart Poettering wrote: On Do, 17.01.19 11:17, Christopher Cox (c...@endlessnow.com) wrote: [Install] WantedBy=multi-user.target In my case, my script rolls through the currently running processes, looking for certain ones, determines listening port (ss) and gets the tim

Re: [systemd-devel] At wits end... need to execute a script prior to anything getting killed/changed on reboot/shutdown

2019-01-17 Thread Lennart Poettering
On Do, 17.01.19 11:17, Christopher Cox (c...@endlessnow.com) wrote: > > > [Install] > > > WantedBy=multi-user.target > > > > > > In my case, my script rolls through the currently running processes, > > > looking > > > for certain ones, determines listening port (ss) and gets the time the > > > pr

Re: [systemd-devel] At wits end... need to execute a script prior to anything getting killed/changed on reboot/shutdown

2019-01-17 Thread Reindl Harald
Am 17.01.19 um 18:51 schrieb Christopher Cox: > On 1/17/19 11:21 AM, Reindl Harald wrote: >> >> Am 17.01.19 um 18:17 schrieb Christopher Cox: >>> On 1/17/19 11:01 AM, Lennart Poettering wrote: Hmm, what kind of processes are you missing? user session stuff? How do you shut down? Note th

Re: [systemd-devel] At wits end... need to execute a script prior to anything getting killed/changed on reboot/shutdown

2019-01-17 Thread Christopher Cox
On 1/17/19 11:21 AM, Reindl Harald wrote: Am 17.01.19 um 18:17 schrieb Christopher Cox: On 1/17/19 11:01 AM, Lennart Poettering wrote: Hmm, what kind of processes are you missing? user session stuff? How do you shut down? Note that display managers are likely to terminate the user sessions fir

Re: [systemd-devel] At wits end... need to execute a script prior to anything getting killed/changed on reboot/shutdown

2019-01-17 Thread Reindl Harald
Am 17.01.19 um 18:17 schrieb Christopher Cox: > On 1/17/19 11:01 AM, Lennart Poettering wrote: >> Hmm, what kind of processes are you missing? user session stuff? How >> do you shut down? Note that display managers are likely to terminate >> the user sessions first, and only initiate system shutd

Re: [systemd-devel] At wits end... need to execute a script prior to anything getting killed/changed on reboot/shutdown

2019-01-17 Thread Christopher Cox
On 1/17/19 11:01 AM, Lennart Poettering wrote: On Do, 17.01.19 10:18, Christopher Cox (c...@endlessnow.com) wrote: On 1/17/19 5:50 AM, Lennart Poettering wrote: With that you can now put together a unit that is terminated relatively early on during shutdown: just make it "After=multi-user.targ

Re: [systemd-devel] At wits end... need to execute a script prior to anything getting killed/changed on reboot/shutdown

2019-01-17 Thread Lennart Poettering
On Do, 17.01.19 10:18, Christopher Cox (c...@endlessnow.com) wrote: > On 1/17/19 5:50 AM, Lennart Poettering wrote: > > With that you can now put together a unit that is terminated > > relatively early on during shutdown: just make it > > "After=multi-user.target graphical.target default.target",

Re: [systemd-devel] At wits end... need to execute a script prior to anything getting killed/changed on reboot/shutdown

2019-01-17 Thread Christopher Cox
On 1/17/19 5:50 AM, Lennart Poettering wrote: With that you can now put together a unit that is terminated relatively early on during shutdown: just make it "After=multi-user.target graphical.target default.target", so that it gets activated at boot very late, and thus deactivated at shutdown ver

Re: [systemd-devel] At wits end... need to execute a script prior to anything getting killed/changed on reboot/shutdown

2019-01-17 Thread Reindl Harald
Am 17.01.19 um 17:00 schrieb Christopher Cox: > On 1/16/19 11:10 PM, Reindl Harald wrote: >> that all is not really new and was not better with sysvinit, it only was >> slow enough, full of sleep/usleep hacks and so most of the time by luck >> worked but with no guarantess anyways > > What I sai

Re: [systemd-devel] At wits end... need to execute a script prior to anything getting killed/changed on reboot/shutdown

2019-01-17 Thread Christopher Cox
On 1/16/19 11:10 PM, Reindl Harald wrote: that all is not really new and was not better with sysvinit, it only was slow enough, full of sleep/usleep hacks and so most of the time by luck worked but with no guarantess anyways What I said it that synchronous execution of a script was possible pri

Re: [systemd-devel] At wits end... need to execute a script prior to anything getting killed/changed on reboot/shutdown

2019-01-17 Thread Lennart Poettering
On Mi, 16.01.19 22:44, Christopher Cox (c...@endlessnow.com) wrote: > On 01/16/2019 12:51 PM, Filipe Brandenburger wrote: > > If you want to run it early in the shutdown process, then keep > > DefaultDependencies=yes, in which case it will run before the base > > dependencies start to get stopped.

Re: [systemd-devel] At wits end... need to execute a script prior to anything getting killed/changed on reboot/shutdown

2019-01-17 Thread Lennart Poettering
On Mi, 16.01.19 12:40, Christopher Cox (c...@endlessnow.com) wrote: > I need to be able to execute a script before anything gets shutdown. That > is, when somebody does a "reboot", "shutdown" or "poweroff", I need this > script to run first, and for it to finish before everything gets > whacked.

Re: [systemd-devel] At wits end... need to execute a script prior to anything getting killed/changed on reboot/shutdown

2019-01-16 Thread Reindl Harald
Am 17.01.19 um 06:04 schrieb Jonathon Kowalski: > On Thu, Jan 17, 2019 at 4:49 AM Christopher Cox wrote: >> Adding some extra systemd clarification. Saying do this After or Before >> other >> service doesn't mean the start/stop completes before moving on. It may >> execute >> asynchronously

Re: [systemd-devel] At wits end... need to execute a script prior to anything getting killed/changed on reboot/shutdown

2019-01-16 Thread Jonathon Kowalski
On Thu, Jan 17, 2019 at 4:49 AM Christopher Cox wrote: > > On 01/16/2019 10:44 PM, Christopher Cox wrote: > > On 01/16/2019 12:51 PM, Filipe Brandenburger wrote: > >> If you want to run it early in the shutdown process, then keep > >> DefaultDependencies=yes, in which case it will run before the b

Re: [systemd-devel] At wits end... need to execute a script prior to anything getting killed/changed on reboot/shutdown

2019-01-16 Thread Christopher Cox
On 01/16/2019 10:44 PM, Christopher Cox wrote: On 01/16/2019 12:51 PM, Filipe Brandenburger wrote: If you want to run it early in the shutdown process, then keep DefaultDependencies=yes, in which case it will run before the base dependencies start to get stopped. If you need some other resour

Re: [systemd-devel] At wits end... need to execute a script prior to anything getting killed/changed on reboot/shutdown

2019-01-16 Thread Christopher Cox
On 01/16/2019 12:51 PM, Filipe Brandenburger wrote: If you want to run it early in the shutdown process, then keep DefaultDependencies=yes, in which case it will run before the base dependencies start to get stopped. If you need some other resources to be up, for instance network, then add Af

Re: [systemd-devel] At wits end... need to execute a script prior to anything getting killed/changed on reboot/shutdown

2019-01-16 Thread Filipe Brandenburger
If you want to run it early in the shutdown process, then keep DefaultDependencies=yes, in which case it will run before the base dependencies start to get stopped. If you need some other resources to be up, for instance network, then add After=network.target, etc. Remember that when shutting dow