Posts: 1,504
Threads: 34
Joined: Jun 2013
It seems that the VPS shuts down every single day at the same time. I would like to make it so when the VPS comes back online, the server will start running by itself (24/7). If someone could teach me how to do this, I'd be grateful. I can give you my information in PM's if you could do it for me.
Thanks again.
Posts: 740
Threads: 61
Joined: Jun 2011
dude, get rid of that vps, if it shuts down every day, its shit
whats the host?
Posts: 1,504
Threads: 34
Joined: Jun 2013
(23 Jul 12, 09:49PM)Jg99 Wrote: dude, get rid of that vps, if it shuts down every day, its shit
whats the host?
vpsfx
Posts: 740
Threads: 61
Joined: Jun 2011
LOLOLOLOLololOLOLOLOLOLOLOL get virpus.com
Posts: 1,504
Threads: 34
Joined: Jun 2013
Thank you for your help Jg99!
If anyone else could attempt as great as James here, that would be appreciated!
Posts: 3,462
Threads: 72
Joined: Jun 2010
Google "Linux startup items" and see if that leads you anywhere. If you need help with a sh script to boot the servers, I can help with that.
I would open a ticket with your provider asking them why they do that, and see if you can fix it. If you can't, it might be worth finding a new provider.
Posts: 700
Threads: 65
Joined: Jun 2010
Jg99, its actually a very fast VPS. It shuts down once a day so fuck you. A lot of good servers have these problems.
Posts: 1,436
Threads: 7
Joined: Jun 2010
Seriously? "Now with extra high availability, reboots only once per day".
But if you really want to stay with them, adapt a template daemon start script and use whatever method your distro provides to start it at boot time.
Posts: 740
Threads: 61
Joined: Jun 2011
(23 Jul 12, 10:54PM)bballn45 Wrote: Jg99, its actually a very fast VPS. It shuts down once a day so fuck you. A lot of good servers have these problems.
dude, my vps has never been rebooted except by me, and my host is pretty good. vpsfx sucks if a server reboots, i have players all the time, so uptime DOES matter. and do not say f*** you to me again on the forums.
Posts: 2,144
Threads: 38
Joined: Aug 2010
24 Jul 12, 02:20AM
(This post was last modified: 24 Jul 12, 02:22AM by Oracle.)
(24 Jul 12, 01:09AM)Jg99 Wrote: dude, my vps has never been rebooted except by me, and my host is pretty good. vpsfx sucks if a server reboots, i have players all the time, so uptime DOES matter. and do not say f*** you to me again on the forums. All right, you.
Cemer did not come here to hear that he should drop the VPS he and whop just purchased yesterday. He was asking how he could solve his problem, not how he could replace it (and possibly encounter even MORE problems).
ANYWHO.
Cemer, pardon me if this is a foolish question, but I do hope you're at least able to start your server manually? At least thats a good start ;)
EDIT: Also, james, having many players doesn't make the server good - look at douze 24/7.
Posts: 156
Threads: 7
Joined: Jun 2010
Create a bash script with
#!/bin/bash
#make-run.sh
#make sure a process is always running.
export DISPLAY=:0 #needed if you are running a simple gui app.
process=YourProcessName
makerun="/usr/bin/program"
if ps ax | grep -v grep | grep $process > /dev/null
then
exit
else
$makerun &
fi
exit
Add a cronjob to run it every 5 mins or so
Posts: 414
Threads: 12
Joined: Feb 2011
Nice script! I have also used cron to solve this issue but no where near as elegantly as above. You could (if the server shuts down at the same time each day) just insert a restart command in your cron daily, that worked for me :)
@JG please stop advertising VPS services in threads, also appologies if this got a little technical for you...
Posts: 1,436
Threads: 7
Joined: Jun 2010
(24 Jul 12, 02:20AM)ShadowFlameZ Wrote: Cemer did not come here to hear that he should drop the VPS he and whop just purchased yesterday. He was asking how he could solve his problem, not how he could replace it (and possibly encounter even MORE problems). Well, if you ask for help, you might not always hear what you wanted to hear. Point is, the best solution for this kind of problem is to switch to a different host. Having a VPS reboot once a day is simply not acceptable, not if you pay for it. The only time a virtual server should reboot is when it (or the host machine) gets a kernel upgrade/security update (and not even than if you're using ksplice), or when it's migrated.
/rant
That kind of cron hack isn't really the optimal solution, more like a "gets the job done" one. It's okay as a temporary kludge for processes that crash frequently (note temporary - if something crashes all the time, either report a bug or get rid of it). If you just want to make sure something is run whenever the server boots, use an init script.
|