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

hook to start acserver #67

Open
sgohl opened this issue Sep 25, 2019 · 4 comments
Open

hook to start acserver #67

sgohl opened this issue Sep 25, 2019 · 4 comments

Comments

@sgohl
Copy link

sgohl commented Sep 25, 2019

Hi,

I am writing a discord bot with the possibility to list configurations and start a server from discord, but I want to use the starting mechanism from your fine acweb app.

The bot should run as a separate process in another docker container, hence there should be some kind of hook to call the procedure to start a server instance, best with predefined ServerName and after-start-hook-script. I could install docker-cli and exec into the running acweb container via docker.sock to execute acserver manually, but I rather want an integration.

a http route which can read json, accessable via internal network would be very good.
Or do you see already an alternative easier method to realize that?

any plans ? :-)

@sgohl sgohl changed the title route to start acserver hook to start acserver Sep 25, 2019
@sgohl
Copy link
Author

sgohl commented Sep 25, 2019

I found out, while acweb maintaining a running acServer pid, killing the pid, acweb recognizes it and will not be shown in the instances panel anymore.
But when I manually start an acServer, the webinterface does not list it.

How do you find out running acServer instances? I hoped, starting an acServer, the webinterface will see it ...

@Kugelschieber
Copy link
Member

acweb starts and monitors processes. If you start an instance outside, it won't know about it. Adding an endpoint might be the best solution to add this feature but I don't have time or interest in doing that. You can create a pull request or fork the project if you would like to do that.

What language do you build that bot in? Maybe you can integrate acweb into your bot or the other way around?

@sgohl
Copy link
Author

sgohl commented Sep 25, 2019

I build the bot via nodejs/discord.js (https://github.com/port22/acbot)

I feared you'd have no time. unfortunately I'm a dumbass in programming, most of the time I don't know what I'm doing and if I change enough, suddenly things work :-D so .. bad but works style :-D

would that endpoint be within the go app or the web/frontend thing?

@Kugelschieber
Copy link
Member

Within the Go app. You would add an endpoint and call it using a user token which you also need to request via the REST API.

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