[DiscordArchive] So finally, it's only about adding the `after` line to my regular services in `systemd` ?
[DiscordArchive] So finally, it's only about adding the `after` line to my regular services in `systemd` ?
Archived author: Ruderalis • Posted: 2022-05-17T16:25:53.510000+00:00
Original source
` if [[ $? == 0 ]]; then`
Is it possible to make it also restart on ".server restart" but not on ".server shutdown" by tweaking this line ? Is 0 the exit code in case of crash ?
Archived author: Revision • Posted: 2022-05-17T16:26:45.781000+00:00
Original source
0 is the exit code on success, meaning the server successfully shut down (.server shutdown/restart) and didn't crash - which would produce a bad error code.
Archived author: Revision • Posted: 2022-05-17T16:27:15.631000+00:00
Original source
There isn't a separate one for restart since the exit code is what.. well, what it is.
Archived author: Revision • Posted: 2022-05-17T16:27:48.710000+00:00
Original source
I haven't looked specifically at .server restart but I can't imagine it's anything but 0 regardless.
Archived author: Ruderalis • Posted: 2022-05-17T16:29:02.401000+00:00
Original source
Yes you must be right. Like in computing in general 0 is exit code for regular success things.
Archived author: Revision • Posted: 2022-05-17T16:29:11.079000+00:00
Original source
Yeah
Archived author: Revision • Posted: 2022-05-17T16:29:39.509000+00:00
Original source
It's just the process telling linux that the process terminated without fault.
Archived author: Ruderalis • Posted: 2022-05-17T16:42:02.259000+00:00
Original source
I'll show you the "controversial in my mind" part of my update script that handle the shutdown when I'll be at my computer. It just came to me as an idea to extract it and make it a standalone shutdown script. I need to remember how I used a param in a script to feature the shutdown message.
Archived author: Ruderalis • Posted: 2022-05-17T16:46:31.600000+00:00
Original source
Well I'll not really bother myself with the shutdown message. It does not make enough sense. The param should be the delay.
Archived author: Revision • Posted: 2022-05-17T16:49:34.721000+00:00
Original source
Well