Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
This question does not appear to be about a specific programming problem, a software algorithm, or software tools primarily used by programmers. If you believe the question would be on-topic on another Stack Exchange site, you can leave a comment to explain where the question may be able to be answered.
Closed 9 years ago.
Improve this question
I have a Linux server application that I managed to "deploy" as a daemon that can be started automatically when the machine starts, independently of user sessions..
I wonder if it is possible to tell the system to automatically restart the application when it crashes, like the service manager in Windows..
Thank you in advance.
Give it a look to monit, it monitors any service/daemon. You have to configure Monit in order to know what criteria to use to start/stop or email you in case something wrong/strange is going on.
What you need is a process supervisor, a utility that manages your daemon and decides when to start/stop it among other things.
There are several of these out there such as supervisord, upstart, runit etc. You will have to research them and find one that best suits your needs.
Hope that helps.
Related
Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
This question does not appear to be about a specific programming problem, a software algorithm, or software tools primarily used by programmers. If you believe the question would be on-topic on another Stack Exchange site, you can leave a comment to explain where the question may be able to be answered.
Closed 1 year ago.
Improve this question
I want to set up some stuff when starting Kubernetes node worker. Specifically, I change systemd service configuration and apply it (systemctl daemon-reload), but from inside the container, I don't know how to configure systemd of node worker
Not sure what you actually want to do, but
Usually systemd is not installed inside containers
I don't know what you want to implement, but I pretty sure that run systemd daemon inside container is a bad idea
In most cases if you want to start long running background process, that will be better idea to run it in separate container and connect two containers.
If you need to do some action on container start before run main process, just override entrypoint, and prepend own command before main one (you may add it with & symbol to run in background, but it is a not smart solution)
Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
This question does not appear to be about a specific programming problem, a software algorithm, or software tools primarily used by programmers. If you believe the question would be on-topic on another Stack Exchange site, you can leave a comment to explain where the question may be able to be answered.
Closed 1 year ago.
Improve this question
I know that truecrypt isn't capable of creating a hidden OS but in another post someone describes the steps to do it manually and that he does it to all of his linux computers all of the time. Can anyone elaborate on his steps so that someone (like myself) who is not as experienced could accomplish this?
I would just ask this individual to provide more details but it appears as though their account is "anonymous" or something.
I developed something like you are describing.
Here https://github.com/antonio-petricca/buddy-linux you can find all the information and installation script.
Buddy linux allows you to install linux on (hidden) loop files (like for the link you provided), but providing GRUB loader by an external USB drive. So, removing, it will results in a Windows boot.
The other good stuff is that it is based on LVM, so you can extended file system "simply" by adding loop files as per your needs.
Regards.
Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
This question does not appear to be about a specific programming problem, a software algorithm, or software tools primarily used by programmers. If you believe the question would be on-topic on another Stack Exchange site, you can leave a comment to explain where the question may be able to be answered.
Closed 5 years ago.
Improve this question
I am pretty new in the cloud-init. I got VM everything is setup and running and I designed the reboot mechanism in the VM to use when VM requires reboot after installing updates. So when I reboot the VM Apache is not working by itself after reboot until I run the start command. Is there a way to make Apache start after every reboot?
problem solved, after reading this two sites
apache-server-doesnt-start-automatically
starting_apache_web_server_at_every_reboot_for_debian_ubuntu_linux
I added this line:
cloud_config['runcmd'].append(['update-rc.d', 'apache2', 'enable'])
Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
Closed 6 years ago.
This question does not appear to be about a specific programming problem, a software algorithm, or software tools primarily used by programmers. If you believe the question would be on-topic on another Stack Exchange site, you can leave a comment to explain where the question may be able to be answered.
This question does not appear to be about a specific programming problem, a software algorithm, or software tools primarily used by programmers. If you believe the question would be on-topic on another Stack Exchange site, you can leave a comment to explain where the question may be able to be answered.
Improve this question
I have a number of machines which I would like to check using my Nagios box. They sit behind a machine which is reachable from my Nagios box; all are running Linux. These machines have no routing to outside networks. If I need to reach the machines manually I either ssh to the intermediate box and then ssh to the other machines, or I'll use ssh to forward a port.
I usually use SNMP for most of my checks. So my thought is that prior to my Nagios box running a check I could have it run a command to forward the needed port, then get rid of the forward when done. Can anyone guide me on the best way to do this?
Thanks!
You probably want to look into Nagios passive checks. As described in the documentation:
Passive checks are useful for monitoring services that are:
Asynchronous in nature and cannot be monitored effectively by polling
their status on a regularly scheduled basis
Located behind a firewall and cannot be checked actively from the monitoring host
Your use case is pretty clearly the second one.
Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
Closed 9 years ago.
This question does not appear to be about a specific programming problem, a software algorithm, or software tools primarily used by programmers. If you believe the question would be on-topic on another Stack Exchange site, you can leave a comment to explain where the question may be able to be answered.
This question does not appear to be about a specific programming problem, a software algorithm, or software tools primarily used by programmers. If you believe the question would be on-topic on another Stack Exchange site, you can leave a comment to explain where the question may be able to be answered.
Improve this question
Assume I have a server already functioning and providing an app to users. At one moment, I have to modify some crucial /etc/ configuration files. For example, /etc/security/limits.conf.
After I do the changes, documentation usually suggests rebooting the machine.
reboot
But this would imply that all processes in the server die, am I right? So, basically what will happen to the guys checking my app hosted on the server that I just "rebooted"? I think the service will stop for a while. Is there any other command or alternative less painful to do after changing crucial files?
I'm on CentOS & Nginx.
PD: If somebody could provide also a link to the difference between "shutdown" and "reboot" (because I found only some vague things), that would be great.
Easy part first - if you run shutdown your computer ends up being off. As in no power. As in, very difficult to fix remotely :). Reboot restarts everything.
It is fairly rare to require a reboot under linux - the only reason to reboot that I can think of is if you upgraded the kernel, if your machine is crashing really badly, or if you want to install some types of new hardware (RAM, plug-in cards etc).
Mostly, when you edit "important files in /etc", you can restart just a part of the system. For example, you might need to restart just your webserver.
There is no complete rule. Try googling "reload ". For example, googling "reload /etc/security/limits" suggests logging out, then logging back in.