Giter Club home page Giter Club logo

Comments (10)

anubisg1 avatar anubisg1 commented on June 16, 2024

for systemd based linux systems, this service script should help:

[Unit]
Description=GNS3 server
After=syslog.target
After=network.target

[Service]
Type=simple
User=root
Group=root
ExecStart=/usr/bin/gns3server --console_bind_to_any

# Give a reasonable amount of time for the server to start up/shut down
TimeoutSec=300

[Install]
WantedBy=multi-user.target

is probably best not to use root:root though ..

from gns3-server.

superwolfboy avatar superwolfboy commented on June 16, 2024

if not use root , to bridge the nio would be a problem I think.

from gns3-server.

tiagoasousa avatar tiagoasousa commented on June 16, 2024

@anubisg1 does that script work on systemd? because on sysinit it does not. I created as script file, but when i try to start it "locks" itself to the shell.

from gns3-server.

anubisg1 avatar anubisg1 commented on June 16, 2024

Hi @networkpadawan , yes, that is a systemd script and it works like a charm. tested on Fedora, Centos, and openSUSE

from gns3-server.

tiagoasousa avatar tiagoasousa commented on June 16, 2024

ubuntu uses sysinit so i have to build a bash script, can´t use yours:/ manage to bypass by using the '&' flag...not perfect but works!

from gns3-server.

anubisg1 avatar anubisg1 commented on June 16, 2024

actually ubuntu uses upstart :D in any case ubuntu is a pain in the ass since it does always things its own way without following any real standard (unity, location of libraries, X server , ecc )

i'd say that the init script might be provided by gns3 as a template or something like that, but distribution packagers should add the service based on their standards.

what gns3 should add instead, is the ability to run gns3server as a daemon. that doesn't required a init script to be working.

from gns3-server.

tiagoasousa avatar tiagoasousa commented on June 16, 2024

you're right, but to upstart seems a init daemon:P (still better than systemd imho )and yes gns3 should daemonize the server, even for a multi tenant env it would help.

from gns3-server.

julien-duponchelle avatar julien-duponchelle commented on June 16, 2024

For upstart:

description "GNS3 server"
author      "GNS3 Team"

start on filesystem or runlevel [2345]
stop on shutdown

script
    echo $$ > /var/run/gns3.pid
    if [ ! -f /usr/local/bin/gns3server ]; then
        pip3 install gns3-server==1.3.0rc2
    fi
    exec start-stop-daemon --start -c gns3 --exec /usr/local/bin/gns3server
end script

pre-start script
    echo "[`date`] GN3 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

from gns3-server.

julien-duponchelle avatar julien-duponchelle commented on June 16, 2024

Daemon is ready in 1.4 I just create a an issue with the need of a systemd script #229

from gns3-server.

julien-duponchelle avatar julien-duponchelle commented on June 16, 2024

Systemd is ready

from gns3-server.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.