From fc289fd868dfe7a48cf79936c88675d3e046eccb Mon Sep 17 00:00:00 2001 From: Julien Duponchelle Date: Wed, 22 Apr 2015 17:13:39 +0200 Subject: [PATCH] Basic upstart script --- README.rst | 26 ++++++++++++++++++++++++++ init/gns3.conf.upstart | 19 +++++++++++++++++++ 2 files changed, 45 insertions(+) create mode 100644 init/gns3.conf.upstart diff --git a/README.rst b/README.rst index a0761c36..091b5fc9 100644 --- a/README.rst +++ b/README.rst @@ -26,6 +26,12 @@ unstable ******** *Never* use this branch for production. Major new features pull requests goes here. +Linux +----- + +GNS3 is perhaps packaged for your distribution: +* Gentoo: https://packages.gentoo.org/package/net-misc/gns3-server + Linux (Debian based) -------------------- @@ -62,6 +68,26 @@ To run tests use: py.test -v + +Run as daemon +*************** + +You will found init sample script for various systems +inside the init directory. + +upstart +~~~~~~~ + +For ubuntu < 15.04 + +You need to copy init/gns3.conf.upstart to /etc/init/gns3.conf + +.. code:: bash + + sudo chown root /etc/init/gns3.conf + sudo service gns3 start + + Windows ------- diff --git a/init/gns3.conf.upstart b/init/gns3.conf.upstart new file mode 100644 index 00000000..6ddccb8a --- /dev/null +++ b/init/gns3.conf.upstart @@ -0,0 +1,19 @@ +description "GNS3 server" +author "GNS3 Team" + +start on filesystem or runlevel [2345] +stop on shutdown + +script + echo $$ > /var/run/gns3.pid + exec start-stop-daemon --start -c gns3 --exec /usr/local/bin/gns3server +end script + +pre-start script + echo "[`date`] GNS3 Starting" >> /var/log/gns3.log +end script + +pre-stop script + rm /var/run/gns3.pid + echo "[`date`] GNS3 Stopping" >> /var/log/gns3.log +end script