Skip to content

Add service File for systemd#45

Open
dns2utf8 wants to merge 1 commit intomasterfrom
service
Open

Add service File for systemd#45
dns2utf8 wants to merge 1 commit intomasterfrom
service

Conversation

@dns2utf8
Copy link
Copy Markdown
Member

I would like to add something to the readme before the merge.

Comment thread coredump_bot.service Outdated
Description=CoredumpBot

[Service]
ExecStart=/home/%u/start_coredump_bot_prod.sh
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Does the bot do anything relative to the current working directory? If yes, I'd set the WorkingDirectory too.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No it is fully static

Comment thread coredump_bot.service Outdated

[Service]
ExecStart=/home/%u/start_coredump_bot_prod.sh
User=non_privileged_user_change_me
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe adding Group= would also be good.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

good point

Comment thread coredump_bot.service Outdated
@@ -0,0 +1,10 @@
[Unit]
Description=CoredumpBot
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If you want to make sure that it isn't launched before network is up, add After=network.target.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍

@dns2utf8
Copy link
Copy Markdown
Member Author

I updated all the depending crates without any conflict and prepared the next release.
Good to go?

Comment thread CHANGELOG.md
## [0.3.2] - 2017-02-12

- Add systemd service unit `coredumpbot.service`
- Add new category `Update`
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't think you need to add change to the changelog format to the version changelog :)

Comment thread Cargo.toml
env_logger = "^0.3"
env_logger = "^0.4"
telegram-bot = "^0.5"
#telegram-bot = { git = "https://github.com/dns2utf8/telegram-bot.git", branch = "api_2.0" }
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Dead code that could be removed.

Comment thread README.md

# Install service file

sudo ln -s $HOME/coredumpbot.service /etc/systemd/system/multi-user.target.wants/coredumpbot.service
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why $HOME?

Also, you shouldn't symlinks service files manually like this. Instead, add them to /etc/systemd/system/ and use systemctl enable <service> instead.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants