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

10 Responses

  1. HawkEYE says:

    –> Running transaction check
    –> Processing Dependency: perl-XML-Dumper >= 0.4 for package: foomatic
    –> Processing Dependency: perl-XML-Parser >= 2.29 for package: foomatic
    –> Processing Dependency: perl-XML-Parser for package: intltool
    –> Processing Dependency: pyorbit >= 2.0.l for package: gnome-python2-bonobo
    –> Processing Dependency: perl-libxml-enno >= 1.02 for package: foomatic
    –> Processing Dependency: perl-Parse-Yapp >= 1.04 for package: foomatic
    –> Processing Dependency: perl-libxml-perl >= 0.07 for package: foomatic
    –> Processing Dependency: perl-XML-Encoding >= 1.01 for package: foomatic
    –> Restarting Dependency Resolution with new changes.
    –> Populating transaction set with selected packages. Please wait.
    —> Package pyorbit.i386 0:2.0.1-1 set to be updated
    –> Running transaction check
    –> Processing Dependency: perl-XML-Dumper >= 0.4 for package: foomatic
    –> Processing Dependency: perl-XML-Parser >= 2.29 for package: foomatic
    –> Processing Dependency: perl-XML-Parser for package: intltool
    –> Processing Dependency: perl-libxml-enno >= 1.02 for package: foomatic
    –> Processing Dependency: perl-Parse-Yapp >= 1.04 for package: foomatic
    –> Processing Dependency: perl-libxml-perl >= 0.07 for package: foomatic
    –> Processing Dependency: perl-XML-Encoding >= 1.01 for package: foomatic
    –> Finished Dependency Resolution
    Error: Missing Dependency: perl-XML-Dumper >= 0.4 is needed by package foomatic
    Error: Missing Dependency: perl-Parse-Yapp >= 1.04 is needed by package foomatic
    Error: Missing Dependency: perl-libxml-enno >= 1.02 is needed by package foomatic
    Error: Missing Dependency: perl-XML-Encoding >= 1.01 is needed by package foomatic
    Error: Missing Dependency: perl-XML-Parser >= 2.29 is needed by package foomatic
    Error: Missing Dependency: perl-libxml-perl >= 0.07 is needed by package foomatic
    Error: Missing Dependency: perl-XML-Parser is needed by package intltool

    Reply
  2. HawkEYE says:

    –> Running transaction check
    –> Processing Dependency: perl-XML-Dumper >= 0.4 for package: foomatic
    –> Processing Dependency: perl-XML-Parser >= 2.29 for package: foomatic
    –> Processing Dependency: perl-XML-Parser for package: intltool
    –> Processing Dependency: pyorbit >= 2.0.l for package: gnome-python2-bonobo
    –> Processing Dependency: perl-libxml-enno >= 1.02 for package: foomatic
    –> Processing Dependency: perl-Parse-Yapp >= 1.04 for package: foomatic
    –> Processing Dependency: perl-libxml-perl >= 0.07 for package: foomatic
    –> Processing Dependency: perl-XML-Encoding >= 1.01 for package: foomatic
    –> Restarting Dependency Resolution with new changes.
    –> Populating transaction set with selected packages. Please wait.
    —> Package pyorbit.i386 0:2.0.1-1 set to be updated
    –> Running transaction check
    –> Processing Dependency: perl-XML-Dumper >= 0.4 for package: foomatic
    –> Processing Dependency: perl-XML-Parser >= 2.29 for package: foomatic
    –> Processing Dependency: perl-XML-Parser for package: intltool
    –> Processing Dependency: perl-libxml-enno >= 1.02 for package: foomatic
    –> Processing Dependency: perl-Parse-Yapp >= 1.04 for package: foomatic
    –> Processing Dependency: perl-libxml-perl >= 0.07 for package: foomatic
    –> Processing Dependency: perl-XML-Encoding >= 1.01 for package: foomatic
    –> Finished Dependency Resolution
    Error: Missing Dependency: perl-XML-Dumper >= 0.4 is needed by package foomatic
    Error: Missing Dependency: perl-Parse-Yapp >= 1.04 is needed by package foomatic
    Error: Missing Dependency: perl-libxml-enno >= 1.02 is needed by package foomatic
    Error: Missing Dependency: perl-XML-Encoding >= 1.01 is needed by package foomatic
    Error: Missing Dependency: perl-XML-Parser >= 2.29 is needed by package foomatic
    Error: Missing Dependency: perl-libxml-perl >= 0.07 is needed by package foomatic
    Error: Missing Dependency: perl-XML-Parser is needed by package intltool

    Reply
  3. HawkEYE says:
    Reply
  4. HawkEYE says:
    Reply
  5. HawkEYE says:

    [email protected] [~]# yum groupinstall ‘X Window System’ –exclude=gail –exclude=foomatic –exclude=system-config-printer –exclude=Omni-foomatic –exclude=gtkhtml2 –exclude=intltool –exclude=gnome-python2-gtkhtml2 –exclude=hal-cups-utils –exclude=scrollkeeper –exclude=rhn-applet –exclude=system-config-printer-gui –exclude=gdm

    Reply
  6. HawkEYE says:

    [email protected] [~]# yum groupinstall ‘X Window System’ –exclude=gail –exclude=foomatic –exclude=system-config-printer –exclude=Omni-foomatic –exclude=gtkhtml2 –exclude=intltool –exclude=gnome-python2-gtkhtml2 –exclude=hal-cups-utils –exclude=scrollkeeper –exclude=rhn-applet –exclude=system-config-printer-gui –exclude=gdm

    Reply
  7. HawkEYE says:

    Error: Missing Dependency: gail >= 1.5.0 is needed by package at-spi
    Error: Missing Dependency: scrollkeeper is needed by package gthumb
    Error: Missing Dependency: hal-cups-utils is needed by package desktop-printing
    Error: Missing Dependency: scrollkeeper is needed by package gpdf
    Error: Missing Dependency: libgailutil.so.17 is needed by package gnome-applets
    Error: Missing Dependency: scrollkeeper is needed by package gnome-panel
    Error: Missing Dependency: libgailutil.so.17 is needed by package gedit
    Error: Missing Dependency: gtkhtml2 >= 2.3.0 is needed by package yelp
    Error: Missing Dependency: scrollkeeper is needed by package yelp
    Error: Missing Dependency: scrollkeeper is needed by package ggv
    Error: Missing Dependency: scrollkeeper >= 0.1.4 is needed by package gnome-media
    Error: Missing Dependency: scrollkeeper >= 0.1.4 is needed by package gnome-applets
    Error: Missing Dependency: libgailutil.so.17 is needed by package at-spi
    Error: Missing Dependency: scrollkeeper >= 0.1.4 is needed by package nautilus
    Error: Missing Dependency: scrollkeeper >= 0.1.4 is needed by package gok
    Error: Missing Dependency: scrollkeeper >= 0.3.4-2 is needed by package file-roller
    Error: Missing Dependency: scrollkeeper is needed by package gnome-pilot
    Error: Missing Dependency: libgailutil.so.17 is needed by package control-center
    Error: Missing Dependency: /usr/bin/scrollkeeper-update is needed by package gnopernicus
    Error: Missing Dependency: libgtkhtml-2.so.0 is needed by package yelp
    Error: Missing Dependency: libgailutil.so.17 is needed by package nautilus-media
    Error: Missing Dependency: libgailutil.so.17 is needed by package gok
    Error: Missing Dependency: scrollkeeper >= 0.3.11 is needed by package gnome-user-docs
    Error: Missing Dependency: libgailutil.so.17 is needed by package nautilus
    Error: Missing Dependency: libgailutil.so.17 is needed by package gnome-media
    Error: Missing Dependency: scrollkeeper >= 0.1.4 is needed by package gedit
    Error: Missing Dependency: libgailutil.so.17 is needed by package eog
    Error: Missing Dependency: libgailutil.so.17 is needed by package eel2
    Error: Missing Dependency: libgailutil.so.17 is needed by package nautilus-cd-burner

    Reply
  8. HawkEYE says:

    Error: Missing Dependency: gail >= 1.5.0 is needed by package at-spi
    Error: Missing Dependency: scrollkeeper is needed by package gthumb
    Error: Missing Dependency: hal-cups-utils is needed by package desktop-printing
    Error: Missing Dependency: scrollkeeper is needed by package gpdf
    Error: Missing Dependency: libgailutil.so.17 is needed by package gnome-applets
    Error: Missing Dependency: scrollkeeper is needed by package gnome-panel
    Error: Missing Dependency: libgailutil.so.17 is needed by package gedit
    Error: Missing Dependency: gtkhtml2 >= 2.3.0 is needed by package yelp
    Error: Missing Dependency: scrollkeeper is needed by package yelp
    Error: Missing Dependency: scrollkeeper is needed by package ggv
    Error: Missing Dependency: scrollkeeper >= 0.1.4 is needed by package gnome-media
    Error: Missing Dependency: scrollkeeper >= 0.1.4 is needed by package gnome-applets
    Error: Missing Dependency: libgailutil.so.17 is needed by package at-spi
    Error: Missing Dependency: scrollkeeper >= 0.1.4 is needed by package nautilus
    Error: Missing Dependency: scrollkeeper >= 0.1.4 is needed by package gok
    Error: Missing Dependency: scrollkeeper >= 0.3.4-2 is needed by package file-roller
    Error: Missing Dependency: scrollkeeper is needed by package gnome-pilot
    Error: Missing Dependency: libgailutil.so.17 is needed by package control-center
    Error: Missing Dependency: /usr/bin/scrollkeeper-update is needed by package gnopernicus
    Error: Missing Dependency: libgtkhtml-2.so.0 is needed by package yelp
    Error: Missing Dependency: libgailutil.so.17 is needed by package nautilus-media
    Error: Missing Dependency: libgailutil.so.17 is needed by package gok
    Error: Missing Dependency: scrollkeeper >= 0.3.11 is needed by package gnome-user-docs
    Error: Missing Dependency: libgailutil.so.17 is needed by package nautilus
    Error: Missing Dependency: libgailutil.so.17 is needed by package gnome-media
    Error: Missing Dependency: scrollkeeper >= 0.1.4 is needed by package gedit
    Error: Missing Dependency: libgailutil.so.17 is needed by package eog
    Error: Missing Dependency: libgailutil.so.17 is needed by package eel2
    Error: Missing Dependency: libgailutil.so.17 is needed by package nautilus-cd-burner

    Reply
  9. HawkEYE says:

    I use yum just to install the packages not to download.

    1- Create a directory like /usr/share/yum-custom.

    2- Download the packages to that directory.

    3- cd to that directory and:
    # createrepo .

    4- Create the repository config file:
    # touch /etc/yum.repos.d/fedora-custom.repo

    5- copy this to that file:
    [custom]
    name=Fedora Custom $releasever – $basearch
    baseurl=file:///usr/share/yum-custom/
    enabled=1
    gpgcheck=0

    Finally:
    # yum install postgresql*

    I think it would be much easier for everybody if postgresql had its
    own set of repositories. Each time you update the directory you would
    do a createrepo in that directoy. Then you could distribute a yum
    config file for the repositories using the mirrors already in place.
    Fedora does it but I don’t know the details. This is the default
    fedora yum update config file:

    $ cat /etc/yum.repos.d/fedora-updates.repo
    [updates]
    name=Fedora Core $releasever – $basearch – Updates
    #baseurl=http://download.fedora.redhat.com/pub/fedora/linux/core/updates/$releasever/$basearch/
    mirrorlist=http://mirrors.fedoraproject.org/mirrorlist?repo=updates-released-fc$releasever&arch=$basearch
    enabled=1
    gpgcheck=1
    gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-fedora

    I mantain my own mirror of the Fedora repositories which are updated
    at night. This is the script I use to sync it:

    # cat rsync-yum-repo.sh
    rsync -q -a –exclude=debug –exclude=repodata
    rsync://fedora.server4you.net/fedora/core/updates/5/i386/
    /html/yum/5/i386/updates
    rsync -q -a –exclude=debug –exclude=repodata
    rsync://fedora.server4you.net/fedora/extras/5/i386/
    /html/yum/5/i386/extras
    rsync -q -a –exclude=debug –exclude=repodata
    rsync://fedora.server4you.net/fedora/core/5/i386/os/Fedora/RPMS/
    /html/yum/5/i386/os
    createrepo -q -c /html/yum/5/i386/updates/checksum /html/yum/5/i386/updates
    createrepo -q -c /html/yum/5/i386/extras/checksum /html/yum/5/i386/extras
    createrepo -q -c /html/yum/5/i386/os/checksum /html/yum/5/i386/os

    Then my yum config files point to the local repository in instead of
    to the mirrors.

    Reply
  10. HawkEYE says:

    I use yum just to install the packages not to download.

    1- Create a directory like /usr/share/yum-custom.

    2- Download the packages to that directory.

    3- cd to that directory and:
    # createrepo .

    4- Create the repository config file:
    # touch /etc/yum.repos.d/fedora-custom.repo

    5- copy this to that file:
    [custom]
    name=Fedora Custom $releasever – $basearch
    baseurl=file:///usr/share/yum-custom/
    enabled=1
    gpgcheck=0

    Finally:
    # yum install postgresql*

    I think it would be much easier for everybody if postgresql had its
    own set of repositories. Each time you update the directory you would
    do a createrepo in that directoy. Then you could distribute a yum
    config file for the repositories using the mirrors already in place.
    Fedora does it but I don’t know the details. This is the default
    fedora yum update config file:

    $ cat /etc/yum.repos.d/fedora-updates.repo
    [updates]
    name=Fedora Core $releasever – $basearch – Updates
    #baseurl=http://download.fedora.redhat.com/pub/fedora/linux/core/updates/$releasever/$basearch/
    mirrorlist=http://mirrors.fedoraproject.org/mirrorlist?repo=updates-released-fc$releasever&arch=$basearch
    enabled=1
    gpgcheck=1
    gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-fedora

    I mantain my own mirror of the Fedora repositories which are updated
    at night. This is the script I use to sync it:

    # cat rsync-yum-repo.sh
    rsync -q -a –exclude=debug –exclude=repodata
    rsync://fedora.server4you.net/fedora/core/updates/5/i386/
    /html/yum/5/i386/updates
    rsync -q -a –exclude=debug –exclude=repodata
    rsync://fedora.server4you.net/fedora/extras/5/i386/
    /html/yum/5/i386/extras
    rsync -q -a –exclude=debug –exclude=repodata
    rsync://fedora.server4you.net/fedora/core/5/i386/os/Fedora/RPMS/
    /html/yum/5/i386/os
    createrepo -q -c /html/yum/5/i386/updates/checksum /html/yum/5/i386/updates
    createrepo -q -c /html/yum/5/i386/extras/checksum /html/yum/5/i386/extras
    createrepo -q -c /html/yum/5/i386/os/checksum /html/yum/5/i386/os

    Then my yum config files point to the local repository in instead of
    to the mirrors.

    Reply

Leave a Reply

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