Skip to main content

Adding Start Up Service With Webmin

We all know that Webmin is like a swiss army knife for Linux SysAds, but again, there are some programs you want to start running as your machine boots or to shut down the program when you invoke a shut down command or a reboot.

I personally use this during power failures when the system wakes up, I want all programs to be up and running.

As an example, ive downloaded and compiled inadyn, a dynamic DNS updater for Linux.

First important thing to know is the directory where the program is located.. When logged in in your shell, go to the directory where the program is located and type pwd (that is print working directory) and it will give you your current location.

In my case the result is: /root/inadyn/bin/linux/

Then you should know if theres a proper shut down command for the program, in inadyns case, theres none. Also, take note of the program name.. In my case the program name is inadyn and I run the program using ./inadyn

Theres a trick here, since if you run it, it will be just on standby.. and when you quit, the program shuts down.. The trick here is to add an & at the end to run it on background..

So to complete it, /root/inadyn/bin/linux/./inadyn&

So we have our command to run..

Go log in to your Webmin website and go to the System tab and select Bootup and Shutdown. Select the Create new bootup and shutdown action ..


After, you could add in your commands and give it a name.. Take note of the name, it should not contain spaces.. Just add a more complete description so you know what runs which when you get back to the list.

Going back to the shut down process, I invoked a killall -9 inadyn so it will force kill the program upon shutting down. This might not be a good idea since killing it on the -9 level is like 'end task' in Windows jargon. It may not properly do last minute saving of data.


An in depht article about killin in -9 is discussed here: http://speculation.org/garrick/kill-9.html

You might want to go easy on the killing. :)

Comments

Popular posts from this blog

Moving to a New Linux Web Based Torrent Client

For years, I have been using TorrentFlux (url here) as my primary torrent client situated in my Ubuntu download server. But as time went on, the developers completely abandoned the development of TorrentFlux which led to several forks which I think is still insufficient for my needs. Main GUI of TorrentFlux Ive checked several options which runs on a GUI-less environment. Since my Ubuntu server is just running on command line to save precious memory, I needed something bare, simple and is packed with features. Installing uTorrent Server is pretty straight forward. Download. Uncompress. Run. This is better than the approach of TorrentFlux which you need to setup LAMP server and create a database. More often than not, it happens to me that some of the data in the DB gets corrupted. I normally just reinstall the whole thing again. Main GUI of uTorrent Server To further elaborate on the setup process, I've gotten an excerpt from this thread which, quite simply discusses ho

LTE and the Unlocked iPhone 5

So heres the deal, theres a new iPhone out there and its got the new blazing LTE. If you're planning to get one buying from countries which have unlocked options (Canada, Singapore, Hong Kong) doesnt necessarily merit that you'll get LTE compatibility wherever you go. In the iPhone 5 website, theres a little asterisk there. Pretty sneaky if you ask me, that they have created 2 different models probably using 2 different LTE chips. GSM model A1428*: UMTS/HSPA+/DC-HSDPA (850, 900, 1900, 2100 MHz); GSM/EDGE (850, 900, 1800, 1900 MHz); LTE (Bands 4 and 17)  GSM model A1429*: UMTS/HSPA+/DC-HSDPA (850, 900, 1900, 2100 MHz); GSM/EDGE (850, 900, 1800, 1900 MHz); LTE (Bands 1, 3, 5) - From: http://www.apple.com/iphone/specs.html So what does this mean? If you're planning to get an unlocked unit from other country, LTE speeds might not be compatible with yours. From Wikpedia , theres a working list of LTE bands per country. With me residing in the Philippines it seems t

OBS Black/Frozen Screen Issue

Recently I went back to streaming and tried to improve my setup and use Streamlabs OBS  (SLOBS), a variant of the popular Open Broadcaster Software (OBS) which includes a really nice app for iOS and Android which lets you control you broadcast. My only issue about SLOBS (and/or OBS) in general is when you stream some games, its a hit or miss experience. Most of the reported issues include a black screen (but with audio) or in my experience, frozen frames as I transition from one part of a game to another. I had the time to do some trial and error testing yesterday and listed below is the pre-requisites and some quick summary of my setup. Take note of the terminologies used throughout this post. Terminologies SLOBS/OBS - Streaming software, liberally used interchangeably in this post.  Source - This is where an input of OBS is coming from. This can be a webcam, computer screen, full screen application, a webpage, an image, etc. Display Capture - Captures your whole screen re