3urobeat / steam-comment-service-bot

📡 The most advanced Steam Account Manager Bot with mass coordinated comments/likes/favs/follows and plugin support
https://steamcommunity.com/id/3urobeatscommentbot
GNU General Public License v3.0
274 stars 40 forks source link

Data Integrity check fails when using an absolute path #217

Closed 3urobeat closed 11 months ago

3urobeat commented 1 year ago

Discussed in https://github.com/3urobeat/steam-comment-service-bot/discussions/216

Originally posted by **casper-none** November 6, 2023 Can I run this script on Ubuntu? I made systemd so that the script runs in the background but I get this error ![image](https://github.com/3urobeat/steam-comment-service-bot/assets/63936597/e1910572-65bd-4e4f-bb97-17612db3f2f4) This is what the file looks like ``` [Unit] Description=Comment Bot After=network.target [Service] ExecStart=/usr/bin/node /home/comms/commentbot/start.js Restart=on-success RestartSec=5s [Install] WantedBy=multi-user.target ```

 

After further investigation it seems like the data integrity check uses relative paths from the current location of the terminal; which is of course incorrect when using an absolute path.

3urobeat commented 1 year ago

Found a workaround for now - simply define a WorkingDirectory should you also use a systemd service file.
The file from above should look like this:

[Unit]
Description=Comment Bot
After=network.target

[Service]
WorkingDirectory=/home/comms/commentbot
ExecStart=/usr/bin/node start.js
Restart=on-success
RestartSec=5s

[Install]
WantedBy=multi-user.target

If you were trying to start directly from a terminal using an absolute path, please make sure you cd into the bot's folder first and then use a relative path like node ./start.js.

3urobeat commented 11 months ago

Version 2.14.1 is out on the master branch which fixes this issue.