Kick a command when shutdown, and cancel shutdown if neededRun an arbitrary command when a service failsSysV init scripts to systemd migration in RHEL7K99 stop order in pure systemd unitShutdown procedure clarificationkick off a systemd service just before shutdownMonit during rebootStop systemd service after another at shutdown and rebootRunning a script with systemd on shutdown or rebootRun skript on shutdown and restartSending Alert Email on Linux Server Shutdown or Reboot
In Japanese, what’s the difference between “Tonari ni” (となりに) and “Tsugi” (つぎ)? When would you use one over the other?
Which models of the Boeing 737 are still in production?
Why doesn't Newton's third law mean a person bounces back to where they started when they hit the ground?
How does strength of boric acid solution increase in presence of salicylic acid?
Schoenfled Residua test shows proportionality hazard assumptions holds but Kaplan-Meier plots intersect
Why do I get two different answers for this counting problem?
Why did the Germans forbid the possession of pet pigeons in Rostov-on-Don in 1941?
Prove that NP is closed under karp reduction?
How can bays and straits be determined in a procedurally generated map?
Why can't I see bouncing of a switch on an oscilloscope?
Fencing style for blades that can attack from a distance
Approximately how much travel time was saved by the opening of the Suez Canal in 1869?
What do the dots in this tr command do: tr .............A-Z A-ZA-Z <<< "JVPQBOV" (with 13 dots)
Font hinting is lost in Chrome-like browsers (for some languages )
What's the point of deactivating Num Lock on login screens?
I’m planning on buying a laser printer but concerned about the life cycle of toner in the machine
Why doesn't H₄O²⁺ exist?
How do I create uniquely male characters?
Do VLANs within a subnet need to have their own subnet for router on a stick?
Minkowski space
How does one intimidate enemies without having the capacity for violence?
Can an x86 CPU running in real mode be considered to be basically an 8086 CPU?
What do you call a Matrix-like slowdown and camera movement effect?
can i play a electric guitar through a bass amp?
Kick a command when shutdown, and cancel shutdown if needed
Run an arbitrary command when a service failsSysV init scripts to systemd migration in RHEL7K99 stop order in pure systemd unitShutdown procedure clarificationkick off a systemd service just before shutdownMonit during rebootStop systemd service after another at shutdown and rebootRunning a script with systemd on shutdown or rebootRun skript on shutdown and restartSending Alert Email on Linux Server Shutdown or Reboot
.everyoneloves__top-leaderboard:empty,.everyoneloves__mid-leaderboard:empty,.everyoneloves__bot-mid-leaderboard:empty margin-bottom:0;
I want to see if a process is running when shutdown is requested, and abort shutdown process if it is.
I know I can run a script within shutdown/reboot phase using init script etc.
But, is there any way to abort/cancel the shutdown/reboot during init script etc?
linux systemd sysvinit
New contributor
Hiroshi Araki is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.
add a comment |
I want to see if a process is running when shutdown is requested, and abort shutdown process if it is.
I know I can run a script within shutdown/reboot phase using init script etc.
But, is there any way to abort/cancel the shutdown/reboot during init script etc?
linux systemd sysvinit
New contributor
Hiroshi Araki is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.
3
How about the other way around? Use a wrapper script or function to check if the process is running first, and then call the shutdown command.
– Haxiel
2 days ago
add a comment |
I want to see if a process is running when shutdown is requested, and abort shutdown process if it is.
I know I can run a script within shutdown/reboot phase using init script etc.
But, is there any way to abort/cancel the shutdown/reboot during init script etc?
linux systemd sysvinit
New contributor
Hiroshi Araki 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 see if a process is running when shutdown is requested, and abort shutdown process if it is.
I know I can run a script within shutdown/reboot phase using init script etc.
But, is there any way to abort/cancel the shutdown/reboot during init script etc?
linux systemd sysvinit
linux systemd sysvinit
New contributor
Hiroshi Araki is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.
New contributor
Hiroshi Araki is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.
New contributor
Hiroshi Araki is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.
asked 2 days ago
Hiroshi ArakiHiroshi Araki
1
1
New contributor
Hiroshi Araki is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.
New contributor
Hiroshi Araki is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.
Hiroshi Araki is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.
3
How about the other way around? Use a wrapper script or function to check if the process is running first, and then call the shutdown command.
– Haxiel
2 days ago
add a comment |
3
How about the other way around? Use a wrapper script or function to check if the process is running first, and then call the shutdown command.
– Haxiel
2 days ago
3
3
How about the other way around? Use a wrapper script or function to check if the process is running first, and then call the shutdown command.
– Haxiel
2 days ago
How about the other way around? Use a wrapper script or function to check if the process is running first, and then call the shutdown command.
– Haxiel
2 days ago
add a comment |
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/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
);
);
Hiroshi Araki is a new contributor. Be nice, and check out our Code of Conduct.
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2funix.stackexchange.com%2fquestions%2f510419%2fkick-a-command-when-shutdown-and-cancel-shutdown-if-needed%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
Hiroshi Araki is a new contributor. Be nice, and check out our Code of Conduct.
Hiroshi Araki is a new contributor. Be nice, and check out our Code of Conduct.
Hiroshi Araki is a new contributor. Be nice, and check out our Code of Conduct.
Hiroshi Araki 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.
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2funix.stackexchange.com%2fquestions%2f510419%2fkick-a-command-when-shutdown-and-cancel-shutdown-if-needed%23new-answer', 'question_page');
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
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
3
How about the other way around? Use a wrapper script or function to check if the process is running first, and then call the shutdown command.
– Haxiel
2 days ago