Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

how to deamonize? #617

Open
radmx opened this issue Oct 10, 2022 · 2 comments
Open

how to deamonize? #617

radmx opened this issue Oct 10, 2022 · 2 comments

Comments

@radmx
Copy link

radmx commented Oct 10, 2022

pm2 looks tricky, can anyone daemonize discord-irc on a different way ?

regards

@radmx
Copy link
Author

radmx commented Oct 11, 2022

i've found the solution inspired on this issue

#604 <--al credits goes to this guy

but the code has to change on the discord-irc.service

solution for debian boxes

Note: i've downloaded and install on /root/discord-irc and my config.json is inside this folder

here the steps

1.- create discord-irc.service with nano on /etc/systemd/system:

] nano /etc/systemd/system/discord-irc.service

paste like this on editor:

[Unit]
Description=Discord IRC bridge

[Service]
Restart=always
RestartSec=5s
User=root
Type=simple
ExecStart=/usr/local/bin/discord-irc --config /root/discord-irc/config.json

[Install]
WantedBy=multi-user.target

save ( ctrl+x and ctrl +o)

run:
systemctl daemon-reload
systemctl enable discord-irc
systemctl start discord-irc

once again, i installed discord-irc as root, probably file path's can change if you install on other user, this is not been confirmed at this point

and there you go!

@notvillers
Copy link

I think you should add
Requires=network-online.target
After=network-online.target
in the [Unit] after Description=Discord IRC bridge so it will only run if you have internet connection.

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

No branches or pull requests

2 participants