How to write an upstart event.d script

this one to suit the setting of having in /etc/inittab at
the version of previous inittab in fc8

vp:345:respawn:/usr/sbin/vtund -n -f /etc/vtund-pcnamranhq.conf pcnamran-hqsatellite 66.249.93.104

but for fc9 .. it is now using upstart.. the same thing that had been used by ubuntu 8.04 / 8.10 ..

so need to create a new one at /etc/event.d/vpn2hqsatellite

YMMV.

# vpn2hqsatellite - vtund
#
# This service maintains a vtund client from the point the system is
# started until it is shut down again.
description     "vtund client daemon"
author          "Namran Hussin namran at namran dot net"
start on runlevel 3
start on runlevel 4
start on runlevel 5
stop on runlevel 0
stop on runlevel 1
stop on runlevel 6
respawn
exec /usr/sbin/vtund -n -f  /etc/vtund-pcnamranhq.conf pcnamran-hqsatellite 66.249.93.104

to test.. start it with..

initctl start vpn2hqsatellite

kinda weird.. as before we just use

kill -HUP 1

but nevermind as long as it working then fine..

initctl status vpn2hqsatellite

easy .. huh?
vpn2hq2.png

btw : ‘encrypt yes;’ on vtund-3.0.1 can’t connect to server vtund-1.0.8 with ‘encrypt yes;’ option.
as default for 1.0.8 encrypt is just blowfish. but for 3.0.1 is default method is ‘blowfish128ecb’.

and this wordpress plugin code can’t process a line with white-space as part of the code..

Related Post

2 Responses

  1. myxery™ says:

    there are few mistakes there.
    1)the notebook is Macbook not Macbook Pro
    2)the LCD is 22-inch. Couldn’t afford to buy 32″.
    3)last but not least, iPhone first generation ppl called iPhone 2G (EDGE) instead of G1 coz the term G1 led to confusion with HTC/Google Android G1

    :p . Just my 2 cent.

    Reply
  2. ahstod says:

    No need to compare lah … if you do that forever you will not be satisfied with what you have, especially when it comes to material things. There will always be someone with a faster car, bigger house, cooler gadgets. You can spend forever in the rat race trying to keep up … or try to find happiness in the life that we already have.

    Attaining all those things come with more challenges attached as well. I believe God will grant us these once we are really ready for them.

    Life is like playing Lode Runner … need all sorts of strategies and tactics to survive and cope, and make it through the day. Once you have mastered them … what do you get? Next level, with more challenges! And is like that all the way … 😎

    Reply

Leave a Reply

Your email address will not be published. Required fields are marked *