Code Monkey home page Code Monkey logo

Comments (14)

rssnyder avatar rssnyder commented on July 20, 2024

Edit the service file so it has the flags you need.

/etc/systemd/system/discord-stock-ticker.service

from discord-stock-ticker.

ssamachi avatar ssamachi commented on July 20, 2024

IMG_20220127_214549
Like this?

from discord-stock-ticker.

rssnyder avatar rssnyder commented on July 20, 2024

yes but, the path for your db looks wrong, just make it -db=./discordbottickers.db

from discord-stock-ticker.

ssamachi avatar ssamachi commented on July 20, 2024

Thanks. Do I have to stop the bot and make the tickers again or will this save the tickers that I have already?

from discord-stock-ticker.

rssnyder avatar rssnyder commented on July 20, 2024

Thanks. Do I have to stop the bot and make the tickers again or will this save the tickers that I have already?

be sure and do systemctl daemon-reload after every change to the systemd file, otherwise the changes wont take affect.

once the service has been started with the -db flag, any bots added will be stored in the DB. If you have bots running now added before you added the flag, they will need to be created again after restarting the service with the flag.

you can verify the DB is being using if you see this log line when you start the service INFO[0000] Will be storing state in ./discordbottickers.db

you can see logs with journalctl -f -u discord-stock-ticker

from discord-stock-ticker.

ssamachi avatar ssamachi commented on July 20, 2024

Thank you very much for this

from discord-stock-ticker.

rssnyder avatar rssnyder commented on July 20, 2024

Thank you very much for this

Anytime! I think the best way to make documentation is just to write stuff down when you teach someone new. 9740d88

from discord-stock-ticker.

ssamachi avatar ssamachi commented on July 20, 2024

Thank you very much for this

Anytime! I think the best way to make documentation is just to write stuff down when you teach someone new. 9740d88

IMG_20220128_093525

Is this correct?

from discord-stock-ticker.

rssnyder avatar rssnyder commented on July 20, 2024

you must have an error in your systemd file, share it here and ill take a look.

from discord-stock-ticker.

ssamachi avatar ssamachi commented on July 20, 2024

you must have an error in your systemd file, share it here and ill take a look.

IMG_20220128_100845
Here

I use
systemctl edit discord-stock-ticker.service
To edit

from discord-stock-ticker.

rssnyder avatar rssnyder commented on July 20, 2024

that isnt my template, what you should have is:

https://github.com/rssnyder/discord-stock-ticker/blob/master/discord-stock-ticker.service

[Unit]
Description=discord-stock-ticker
Wants=basic.target
After=basic.target network.target
Before=sshd.service

[Service]
SyslogIdentifier=discord-stock-ticker
StandardOutput=syslog
StandardError=syslog
ExecReload=/bin/kill -HUP $MAINPID
ExecStart=/etc/discord-stock-ticker/discord-stock-ticker -db=./discordbottickers.db
Restart=always

[Install]
WantedBy=multi-user.target

from discord-stock-ticker.

ssamachi avatar ssamachi commented on July 20, 2024

Will the db file create itself or do I have to make one first?

from discord-stock-ticker.

rssnyder avatar rssnyder commented on July 20, 2024

Will the db file create itself or do I have to make one first?

do not create it first it will create the file itself.

from discord-stock-ticker.

ssamachi avatar ssamachi commented on July 20, 2024

IMG_20220128_104318
I got another error

IMG_20220128_104332
I just copied and pasted the one you sent.

from discord-stock-ticker.

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.