mirror of
https://github.com/GNS3/gns3-server
synced 2024-11-24 09:18:08 +00:00
Basic upstart script
This commit is contained in:
parent
531e95463c
commit
fc289fd868
26
README.rst
26
README.rst
@ -26,6 +26,12 @@ unstable
|
|||||||
********
|
********
|
||||||
*Never* use this branch for production. Major new features pull requests goes here.
|
*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)
|
Linux (Debian based)
|
||||||
--------------------
|
--------------------
|
||||||
@ -62,6 +68,26 @@ To run tests use:
|
|||||||
|
|
||||||
py.test -v
|
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
|
Windows
|
||||||
-------
|
-------
|
||||||
|
|
||||||
|
19
init/gns3.conf.upstart
Normal file
19
init/gns3.conf.upstart
Normal file
@ -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
|
Loading…
Reference in New Issue
Block a user