Skip to content

Commit

Permalink
Fix service according to tests on Raspberry
Browse files Browse the repository at this point in the history
  • Loading branch information
ssj4maiko committed Apr 28, 2022
1 parent dc69daf commit 1d55dc8
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 4 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -18,3 +18,4 @@ node_modules/
build/
*.service
src/flair-colors.js
src/flair-colors.ts
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ sudo chmod +x build/index.js

Now on the new `reddit2discord.service`, we fill in the necessary data.

Replace `<BIN_NPM_PATH>` with the absolute path of your node. You can find it with `which npm`.
Replace `<BIN_NODE_PATH>` with the absolute path of your node. You can find it with `which node`.

Replace `<ABSOLUTE_PATH_TO_FOLDER>` with the absolute path of this project. You can find it with `pwd` when inside the project's folder.

Expand All @@ -67,7 +67,7 @@ If however it mentions a problem with the unit file, then you likely wrote somet

Colors and messages are all in code, so if you want to change something, right now, you will have to change the code. If you don't mind the way messages are made, just changing the colors is easy.

In `src/flair-colors.ts`, there are 2 arrays, one of flairs, and another of colors. If you don't know programming, just keep in mind how it's done, and don't forget the commas <,>.
In `src/flair-colors.ts`, there are 2 arrays, one of flairs, and another of colors. If you don't know programming, just keep in mind how it's formatted, and don't forget the commas <,>.

The array of colors is done with integer numbers instead of the usual Hexcode, or RGB values. I see no common sense in how that works right now, so to find new colors, well, good luck.

Expand Down
3 changes: 2 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,8 @@
"description": "A minibot to post new posts from a subreddit to discord, ran from a raspberry pi",
"scripts": {
"test": "echo \"Error: no test specified\" && exit 1",
"startBuild": "tsc && node build/index.js",
"build": "tsc",
"startBuild": "node build/index.js",
"start": "ts-node src/index.ts",
"dev": "nodemon src/index.ts"
},
Expand Down
2 changes: 1 addition & 1 deletion reddit2discord.service.example
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
Description=Reddit2Discord

[Service]
ExecStart=<BIN_NPM_PATH> startBuild
ExecStart=<BIN_NODE_PATH> build/index.js
Restart=always
User=nobody
# Note Debian/Ubuntu uses 'nogroup', RHEL/Fedora uses 'nobody'
Expand Down

0 comments on commit 1d55dc8

Please sign in to comment.