#!/bin/bash while [ true ] do echo "quering bearerbox" sleep 1 count=$(ps -C "bearerbox" | wc -l) echo $count if [ $count -eq 2 ] then echo "attempting to kill bearerbox" killall bearerbox else sleep 1 echo "======= bearerbox killed ========" break fi done sleep 1 bearerbox /etc/kannel/kannel.conf smsfox /etc/kannel/kannel.conf
Internet is vague. It has nothing left to be covered now. However, things get messed up sometimes and I forgot where I used to find the materials I had just searched for some days ago. So, I am now gathering all those into this blog. This is just my bookmark or my scrapbook or anything you wish to say. If you think these are helpful, you can take references, no any rights to be defined here. No styles and no colorful designs, just an area to jot down some scraps and all. Enjoy
Pages
Wednesday, June 23, 2010
Kannel restart script | Attempting to Kill a process in linux until it gets killed
Restarting kannel wasn't simpler, as the bearerbox was not exiting on single stop command for Kannel. So needed to do some tricks on killing the bearerbox first. See the code
Labels:
administration,
bash shell,
Command Help,
fork,
HowTO,
kannel,
Linux,
process,
process management,
Programming
Altering system default timezone in linux
Reference:
http://www.cyberciti.biz/faq/howto-linux-unix-change-setup-timezone-tz-variable/
OR type setup and select time zone configuration (good for remote ssh text based Linux server sessiob)
Select timezone configuration
Now, just follow on screen instructions to change timezone.
Create a symlink to file localtime:
OR some distro use /usr/share/zoneinfo/dirname/zonefile format (Red hat and friends)
OR if you want to set up it to IST (Asia/Calcutta):
Please mote that in above example you need to use directory structure i.e. if you want to set the timezone to Calcutta (India) which is located in the Asia directory you will then have to setup using as above.
Use date command to verify that your timezone is changed:
Output:
Sample Output:
http://www.cyberciti.biz/faq/howto-linux-unix-change-setup-timezone-tz-variable/
Change Linux timezone
Select the method as per your Linux distribution:If you are using Fedora / RHEL / Cent OS Linux
Type the redhat-config-date command at the command line to start the time and date properties tool.# redhat-config-date
OR type setup and select time zone configuration (good for remote ssh text based Linux server sessiob)
# setup
Select timezone configuration
Now, just follow on screen instructions to change timezone.
Set timezone using /etc/localtime configuration file [any Linux distro]
Often /etc/localtime is a symlink to the file localtime or to the correct time zone file in the system time zone directory.Generic procedure to change timezone
Change directory to /etc# cd /etc
Create a symlink to file localtime:
# ln -sf /usr/share/zoneinfo/EST localtime
OR some distro use /usr/share/zoneinfo/dirname/zonefile format (Red hat and friends)
# ln -sf /usr/share/zoneinfo/EST localtime
OR if you want to set up it to IST (Asia/Calcutta):
# ln -sf /usr/share/zoneinfo/Asia/Calcutta localtime
Please mote that in above example you need to use directory structure i.e. if you want to set the timezone to Calcutta (India) which is located in the Asia directory you will then have to setup using as above.
Use date command to verify that your timezone is changed:
$ date
Output:
Tue Aug 27 14:46:08 EST 2006
Use of environment variable
You can use TZ environment variable to display date and time according to your timezone:$ export TZ=America/Los_Angeles
$ date
Sample Output:
Thu Aug 27 11:10:08 PST 2006
Labels:
administration,
Command Help,
configuration,
cyberciti.biz,
date,
FAQ,
HowTO,
Internet,
Linux,
timezone,
Tips and Tricks
Monday, June 21, 2010
Forgot your Google Apps Admin Password
If you forget Google apps admin password, sometimes it might be quite boring not to find the exact link to reset the password, since Google apps says contact administrator to support your login.
If you are yourself admin then ?
hmm, no need to think more.
Just Visit this link
Eg.
https://www.google.com/a/cpanel/appsdomain.com/ForgotAdminAccountInfo
Replace appsdomain.com with your own apps domain
If you are yourself admin then ?
hmm, no need to think more.
Just Visit this link
Eg.
https://www.google.com/a/cpanel/appsdomain.com/ForgotAdminAccountInfo
Replace appsdomain.com with your own apps domain
Labels:
backup and restore,
Domains,
Google,
google apps,
HowTO,
Internet,
reset password,
Tips and Tricks
Friday, June 11, 2010
Setting up email server in Linux
Setting up mail server .
oh !
...
no luck
...
but a good document to follow
http://flurdy.com/docs/postfix/index.html
and few more
http://www.hypexr.org/linux_mail_server.php
http://www.yolinux.com/TUTORIALS/LinuxTutorialMailMTA.html
oh !
...
no luck
...
but a good document to follow
http://flurdy.com/docs/postfix/index.html
and few more
http://www.hypexr.org/linux_mail_server.php
http://www.yolinux.com/TUTORIALS/LinuxTutorialMailMTA.html
Labels:
Bookmarks,
HowTO,
Internet,
Linux,
mail,
Networking,
References,
review
Wednesday, June 9, 2010
download manger in linux - alternate to wget
its been a long time using wget and being fond of.
However, I was just willing to download a large file with multiple concurrent connections on a single path, as many download mangers with GUI provide so.
Not sure, whether wget provides this, but just found a good one.
aria2c
however, its name was so confusing and odd one, I just did a quick ln -s and made it more familiar.
and here is what I did.
-c is for continuing what I downloaded using wget.
and for more easier name of the command.
# sudo ln -s /usr/bin/aria2c /usr/bin/download
so its now the following
# download -s 5 -c http://link-to-download-from-web
and this is the general output format for aria2c
WOW
However, I was just willing to download a large file with multiple concurrent connections on a single path, as many download mangers with GUI provide so.
Not sure, whether wget provides this, but just found a good one.
aria2c
however, its name was so confusing and odd one, I just did a quick ln -s and made it more familiar.
and here is what I did.
# aria2c -s 5 -c http://the-download-url
where -s 5 is for 5 concurrent connections-c is for continuing what I downloaded using wget.
and for more easier name of the command.
# sudo ln -s /usr/bin/aria2c /usr/bin/download
so its now the following
# download -s 5 -c http://link-to-download-from-web
and this is the general output format for aria2c
WOW
Labels:
aria2c,
download manager,
HowTO,
Internet,
Links,
Linux,
References,
Tips and Tricks,
wget
Subscribe to:
Posts (Atom)