My server revisited: Preparing for easter :)

My old laptop turned into a trusty server

My old laptop turned into a trusty server

 

Easter is nearing, my master thesis deadline is nearing (June 1st), all sorts of things are nearing. I’ll be heading home for Easter to be with family and friends. But! Before doing so I wanted to make sure that I would still be able to access my server that is hosting my master thesis web-app. There were a couple of hurdles to overcome:

  1. Automatically check vpn connection every ten min. At the University we connect to internet usually through VPN so the server needed to automatically reconnect to the internet. I solved it by creating a cron job that reconnects to vpn every ten minutes.
  2. On system reboot reconnect to vpn and start noip2 process. The cron program has a very nifty option for running a script after reboot. With that I was able to instruct it to connect to vpn and also start noip which helps sort out my server’s ever changing ip and connect it to a stable domain name.

With these changes combined I should be able to fully work on the server without it being kicked of the network and me being able to reboot it. I did some tests and everything seems to be in order.

If you look closely you'll see a printout of my crontab set to run to scripts when their conditions occur.

If you look closely you’ll see a printout of my crontab set to run to scripts when their conditions occur.

Oh, how much work I’ll be able to get done during Easter… At least I won’t be tearing my hair out because I’m not around to restart my server. The weak point here is in the case of a power outage in which it won’t properly restart the processes. I could insert the laptop battery which could act as a nice buffer but it lowers the battery’s capacity and I’m not sure if I want to do that.

Anyhow. Learned some more sysadmin skills today which might always come in handy. ;)

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s