Git Product home page Git Product logo

Comments (8)

mrlika avatar mrlika commented on August 23, 2024 2

Running a program as a service is very common task that differs depending on OS.
If your system supports system.d than you can just create a .service file like:

/etc/systemd/system/tracker.service

[Unit]
Description=WebTorrent Tracker

[Service]
Type=simple
Restart=always
RestartSec=1
User=root
WorkingDirectory=/opt/wt-tracker
ExecStart=/opt/wt-tracker/bin/wt-tracker

[Install]
WantedBy=multi-user.target

from wt-tracker.

Alexdrr avatar Alexdrr commented on August 23, 2024

hi, i use screen.
apt install screen
screen ./bin/wt-tracker
then press Ctrl+a+d
and the team is already working on the screen

from wt-tracker.

 avatar commented on August 23, 2024

from wt-tracker.

 avatar commented on August 23, 2024

Thanks!
It worked for me.
But it is not a long term solution, I think.

from wt-tracker.

Alexdrr avatar Alexdrr commented on August 23, 2024

Yes, this is a temporary solution that has been working on my server for more than a month. I couldn’t get to work as a system service.

from wt-tracker.

 avatar commented on August 23, 2024

Running a program as a service is very common task that differs depending on OS.
If your system supports system.d than you can just create a .service file like:

/etc/systemd/system/tracker.service

[Unit]
Description=WebTorrent Tracker

[Service]
Type=simple
Restart=always
RestartSec=1
User=root
WorkingDirectory=/opt/wt-tracker
ExecStart=/opt/wt-tracker/bin/wt-tracker

[Install]
WantedBy=multi-user.target

You are my savior. Thank you!

from wt-tracker.

crotel avatar crotel commented on August 23, 2024

Running a program as a service is very common task that differs depending on OS.
If your system supports system.d than you can just create a .service file like:
/etc/systemd/system/tracker.service

[Unit]
Description=WebTorrent Tracker

[Service]
Type=simple
Restart=always
RestartSec=1
User=root
WorkingDirectory=/opt/wt-tracker
ExecStart=/opt/wt-tracker/bin/wt-tracker

[Install]
WantedBy=multi-user.target

You are my savior. Thank you!

as there r "WorkingDirectory=", the "ExecStart=" should not contain that local twice.
fix like this " ExecStart=/bin/wt-tracker "

ps: include node local better.

from wt-tracker.

fluss45 avatar fluss45 commented on August 23, 2024

i trying to install on ubuntu 18 but getting error
0 info it worked if it ends with ok
1 verbose cli [
1 verbose cli '/usr/bin/node',
1 verbose cli '/usr/local/bin/npm',
1 verbose cli 'install',
1 verbose cli '-g',
1 verbose cli 'uNetworking/uWebSockets.js'
1 verbose cli ]
2 info using [email protected]
3 info using [email protected]
4 verbose npm-session dbb6f421ca22774d
5 silly install loadCurrentTree
6 silly install readGlobalPackageData
7 silly fetchPackageMetaData error for github:uNetworking/uWebSockets.js premature close
8 timing stage:rollbackFailedOptional Completed in 3ms
9 timing stage:runTopLevelLifecycles Completed in 27405ms
10 verbose stack Error: premature close
10 verbose stack at PassThrough.onclose (/usr/local/lib/node_modules/npm/node_modules/end-of-stream/index.js:47:67)
10 verbose stack at PassThrough.emit (events.js:322:22)
10 verbose stack at emitCloseNT (internal/streams/destroy.js:69:8)
10 verbose stack at processTicksAndRejections (internal/process/task_queues.js:83:21)
11 verbose cwd /root
12 verbose Linux 4.4.0-177-generic
13 verbose argv "/usr/bin/node" "/usr/local/bin/npm" "install" "-g" "uNetworking/uWebSockets.js"
14 verbose node v12.16.3
15 verbose npm v6.14.4
16 error premature close
17 verbose exit [ 1, true ]

from wt-tracker.

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.