Closed ssamachi closed 2 years ago
Edit the service file so it has the flags you need.
/etc/systemd/system/discord-stock-ticker.service
Like this?
yes but, the path for your db looks wrong, just make it -db=./discordbottickers.db
Thanks. Do I have to stop the bot and make the tickers again or will this save the tickers that I have already?
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
Thank you very much for this
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. https://github.com/rssnyder/discord-stock-ticker/commit/9740d88810dd8e1d5d48c1185627439a3e482192
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
Is this correct?
you must have an error in your systemd file, share it here and ill take a look.
you must have an error in your systemd file, share it here and ill take a look.
Here
I use systemctl edit discord-stock-ticker.service To edit
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
Will the db file create itself or do I have to make one first?
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.
I got another error
I just copied and pasted the one you sent.
I'm currently still learning linux so I'm not that familiar yet. I wanted to ask how will i add the -db setting so that I can save the tickers that I created.
I use this btw and I'm using a vps