r2rka Posted May 23, 2022 Share Posted May 23, 2022 First of all, I apologize if I hit the wrong branch/thread. I haven't found more suitable place for my question so far, however I still feel like Im doing it wrong. Please bear with me as its my second post. Here it is: Running server on AWS EC2 (Linux, Ubuntu). I've made a service as adviced in web, to actually start the process in background and to have a control over start/stop/restart, but still can't find any info on how would I kinda put the process on foreground and use the pz server CLI to actually invoke commands like servermsg and etc. Trying to solve few things, like server restart cron job with server messaging, making scripts for events, etc. I'm not new to coding, however not really experienced with Java. I would appreciate any help with it. Link to comment Share on other sites More sharing options...
EnigmaGrey Posted May 23, 2022 Share Posted May 23, 2022 Don't know if you can / how you'd go about it as a background process. In the past, I used Screen to have the server run on its own "window" inside the command line. https://linux.die.net/man/1/screen r2rka 1 Link to comment Share on other sites More sharing options...
r2rka Posted May 23, 2022 Author Share Posted May 23, 2022 @EnigmaGrey, thanks mate. However I run my server on AWS which means I connect to it through terminal on my mac pc via SSH. What I'm doing currently is - using `systemctl` to start/stop/restart the service (something similar described here under Linux section https://pzwiki.net/wiki/Dedicated_Server) which I've created so far for my user, which means that I have control over the process itself but I can't really (don't understand how) use servers CLI anymore as the process runs in the background. Basically, what I'm looking for is to somehow run the server as background process with ability to get back to it (process) programmatically and use server commands like servermsg. My main goal for now is creating an sh script which would message users about server is being restarted, than stop it, validate/update, start again wrapped in to CRON job. Link to comment Share on other sites More sharing options...
Beard Posted May 23, 2022 Share Posted May 23, 2022 https://linuxgsm.com/ https://linuxize.com/post/how-to-use-linux-screen/ https://linuxize.com/post/getting-started-with-tmux/ These might be helpful to help you achieve that? r2rka 1 Link to comment Share on other sites More sharing options...
r2rka Posted May 23, 2022 Author Share Posted May 23, 2022 @BeardWonderfull! Thank you so much. @EnigmaGrey- I've missunderstood screen at first glance. Its great, thank you! Link to comment Share on other sites More sharing options...
EnigmaGrey Posted May 23, 2022 Share Posted May 23, 2022 10 minutes ago, r2rka said: @BeardWonderfull! Thank you so much. @EnigmaGrey- I've missunderstood screen at first glance. Its great, thank you! I haven’t used it in years, so you can imagine how confusing the google results were trying to look it up. It’s a confusing name for something purely command line. Linux is like that. :p r2rka 1 Link to comment Share on other sites More sharing options...
r2rka Posted May 23, 2022 Author Share Posted May 23, 2022 1 minute ago, EnigmaGrey said: I haven’t used it in years, so you can imagine how confusing the google results were trying to look it up. Its a confusing name for something purely command line. :p It's true yeh, I saw something like 'screens' and 'rendering' so I was like naah, I need one for command line Should've read more carefully (as usual). Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now