[GH-ISSUE #608] No backwards compatability #489

Closed
opened 2026-02-27 02:01:49 +03:00 by kerem · 32 comments
Owner

Originally created by @JimTR on GitHub (Jan 6, 2016).
Original GitHub issue: https://github.com/GameServerManagers/LinuxGSM/issues/608

I wanted a fresh copy of the monitor script so I ran deleted the file and ran './server monitor'
response loading fn_monitor...Not Found
chmod: cannot access ‘fn_monitor’: No such file or directory
./server: line 92: /usr/games/steam/GarrysMod/functions/fn_monitor: No such file or directory

so running wget -N /dev/null https://raw.githubusercontent.com/dgibbs64/linuxgsm/fn_monitor gives the following response
HTTP request sent, awaiting response... 400 Bad Request
2016-01-06 11:38:00 ERROR 400: Bad Request.

so I guess we are a forced upgrade to the new script format ?

Originally created by @JimTR on GitHub (Jan 6, 2016). Original GitHub issue: https://github.com/GameServerManagers/LinuxGSM/issues/608 I wanted a fresh copy of the monitor script so I ran deleted the file and ran './server monitor' response loading fn_monitor...Not Found chmod: cannot access ‘fn_monitor’: No such file or directory ./server: line 92: /usr/games/steam/GarrysMod/functions/fn_monitor: No such file or directory so running wget -N /dev/null https://raw.githubusercontent.com/dgibbs64/linuxgsm/fn_monitor gives the following response HTTP request sent, awaiting response... 400 Bad Request 2016-01-06 11:38:00 ERROR 400: Bad Request. so I guess we are a forced upgrade to the new script format ?
kerem 2026-02-27 02:01:49 +03:00
Author
Owner

@UltimateByte commented on GitHub (Jan 6, 2016):

Hi, sorry to learn that.

All commands and scripts has been renamed to script_name.sh instead of script_name, even the function listing all other functions, present in your main script (in your case gmodserver).
It concerns core_functions.sh and core_getopt.sh.
I guess that's why you're experiencing the issue. So yeah, compatibility is a bit broken, and it will probably not be fixed, you're gonna have to update.

If you wanna update from that, i advise you to remove the functions folder ( rm -R functions), then to rename your old gmodserver script, like (mv gmodserver old.gmodserver), get the new one, and transfer your settings to the new gmodserver script. Don't forget to chmod +x it again, and you're ready to go !

Don't complain too much about that, i've got 12 servers to update that way ! But i'm happy about the update :p

<!-- gh-comment-id:169317539 --> @UltimateByte commented on GitHub (Jan 6, 2016): Hi, sorry to learn that. All commands and scripts has been renamed to script_name.sh instead of script_name, even the function listing all other functions, present in your main script (in your case gmodserver). It concerns core_functions.sh and core_getopt.sh. I guess that's why you're experiencing the issue. So yeah, compatibility is a bit broken, and it will probably not be fixed, you're gonna have to update. If you wanna update from that, i advise you to remove the functions folder ( rm -R functions), then to rename your old gmodserver script, like (mv gmodserver old.gmodserver), get the new one, and transfer your settings to the new gmodserver script. Don't forget to chmod +x it again, and you're ready to go ! Don't complain too much about that, i've got 12 servers to update that way ! But i'm happy about the update :p
Author
Owner

@JimTR commented on GitHub (Jan 6, 2016):

As I have made loads of changes to the core scripts, in order for the overall script to be ran remotely, this is not an option ... My current project has cut out all the coloured responses & non required lines of display so the php web code can read the responses without having to strip out the afore mentioned ... I would guess if , like you, I was running the terminal from a terminal I would have all the 56 servers I have running updated to the new format but I guess if the old code is available I could fork the code and continue develop without any issue

<!-- gh-comment-id:169355369 --> @JimTR commented on GitHub (Jan 6, 2016): As I have made loads of changes to the core scripts, in order for the overall script to be ran remotely, this is not an option ... My current project has cut out all the coloured responses & non required lines of display so the php web code can read the responses without having to strip out the afore mentioned ... I would guess if , like you, I was running the terminal from a terminal I would have all the 56 servers I have running updated to the new format but I guess if the old code is available I could fork the code and continue develop without any issue
Author
Owner

@UltimateByte commented on GitHub (Jan 6, 2016):

Wow, excuse me sir ! Didn't see that coming !
I'm now not sure how you can get that sorted out. Maybe a batch renaming of your functions to match the new system ? You seem like you're very comfortable with programming. What information do you need to figure how to get this solved ?

<!-- gh-comment-id:169359053 --> @UltimateByte commented on GitHub (Jan 6, 2016): Wow, excuse me sir ! Didn't see that coming ! I'm now not sure how you can get that sorted out. Maybe a batch renaming of your functions to match the new system ? You seem like you're very comfortable with programming. What information do you need to figure how to get this solved ?
Author
Owner

@JimTR commented on GitHub (Jan 6, 2016):

Just to give you an idea the structure is such -
Web controller sat on a server ... that auth's the linux user (to another server) the web code then runs (as the authed user) lgsm as that user ... to save disk space there is one installation of each game and when a lgsm server is added to a user some of the game code is symlinked to the users install ... this allows 'update once' across multiple users (there are some pitfalls to this , but I am close to a solution). To fix this I have installed a 'new' server to see what the differences are .. therefore it may be just a quick fix !!
this image is the current web controller of lgsm
ls

there is debug code in the r/h lower corner :)

<!-- gh-comment-id:169370831 --> @JimTR commented on GitHub (Jan 6, 2016): Just to give you an idea the structure is such - Web controller sat on a server ... that auth's the linux user (to another server) the web code then runs (as the authed user) lgsm as that user ... to save disk space there is one installation of each game and when a lgsm server is added to a user some of the game code is symlinked to the users install ... this allows 'update once' across multiple users (there are some pitfalls to this , but I am close to a solution). To fix this I have installed a 'new' server to see what the differences are .. therefore it may be just a quick fix !! this image is the current web controller of lgsm ![ls](https://cloud.githubusercontent.com/assets/4038510/12147136/45644c52-b48f-11e5-9bf5-cdd4a73b22ba.png) there is debug code in the r/h lower corner :)
Author
Owner

@UltimateByte commented on GitHub (Jan 6, 2016):

Maybe instead of modifying the script and break compatibility with script updates, something like that would be a better integration in the future :
https://github.com/dgibbs64/linuxgsm/issues/585

BTW, i really like that web admin panel.
I've been dreaming of something like that since a while.
Maybe something even more advanced with user management, that i could integrate to wordpress and give some serveradmin users the right to reboot a server or send commands to it.

<!-- gh-comment-id:169376192 --> @UltimateByte commented on GitHub (Jan 6, 2016): Maybe instead of modifying the script and break compatibility with script updates, something like that would be a better integration in the future : https://github.com/dgibbs64/linuxgsm/issues/585 BTW, i really like that web admin panel. I've been dreaming of something like that since a while. Maybe something even more advanced with user management, that i could integrate to wordpress and give some serveradmin users the right to reboot a server or send commands to it.
Author
Owner

@JimTR commented on GitHub (Jan 6, 2016):

look at
ls2
all the 'buttons' are there ?

<!-- gh-comment-id:169381152 --> @JimTR commented on GitHub (Jan 6, 2016): look at ![ls2](https://cloud.githubusercontent.com/assets/4038510/12147911/68d31d68-b493-11e5-9262-e2855b556cbf.png) all the 'buttons' are there ?
Author
Owner

@JimTR commented on GitHub (Jan 6, 2016):

I don't think #585 is quite the same

<!-- gh-comment-id:169383643 --> @JimTR commented on GitHub (Jan 6, 2016): I don't think #585 is quite the same
Author
Owner

@UltimateByte commented on GitHub (Jan 6, 2016):

1st post : Do you have the possibility to give rights to certain users to reboot certain servers only ?

2nd post : Woudln't it allow you to add your module without touching the base code ? Or are your modifications too deep for that to be enough ? I guess it's too deep as you removed some GUI funcitons.

You should probably make your own branch of the script.

<!-- gh-comment-id:169384156 --> @UltimateByte commented on GitHub (Jan 6, 2016): 1st post : Do you have the possibility to give rights to certain users to reboot certain servers only ? 2nd post : Woudln't it allow you to add your module without touching the base code ? Or are your modifications too deep for that to be enough ? I guess it's too deep as you removed some GUI funcitons. You should probably make your own branch of the script.
Author
Owner

@JimTR commented on GitHub (Jan 6, 2016):

Each web user can restart every lgsm server he/she owns ... if you note above each server the user owns opens accordion style which then allows you to run the commands (per button) on the sever noted on it's header line

<!-- gh-comment-id:169385735 --> @JimTR commented on GitHub (Jan 6, 2016): Each web user can restart every lgsm server he/she owns ... if you note above each server the user owns opens accordion style which then allows you to run the commands (per button) on the sever noted on it's header line
Author
Owner

@JimTR commented on GitHub (Jan 6, 2016):

the mods are too deep

<!-- gh-comment-id:169385988 --> @JimTR commented on GitHub (Jan 6, 2016): the mods are too deep
Author
Owner

@UltimateByte commented on GitHub (Jan 6, 2016):

How happens ownership ?
How much PHP is under that ? :o))
What's the base of your website ? Custom, or something like Wordpress ?
I'm very interested, as i'm willing to rent servers on my machine. For now, i'm considering leaving SSH access to users, and to create servers manually as i don't plan in making that thing big, just plan to reduce the amount i pay each month for my server.

<!-- gh-comment-id:169386908 --> @UltimateByte commented on GitHub (Jan 6, 2016): How happens ownership ? How much PHP is under that ? :o)) What's the base of your website ? Custom, or something like Wordpress ? I'm very interested, as i'm willing to rent servers on my machine. For now, i'm considering leaving SSH access to users, and to create servers manually as i don't plan in making that thing big, just plan to reduce the amount i pay each month for my server.
Author
Owner

@UltimateByte commented on GitHub (Jan 6, 2016):

BTW, i don't see how we could give support on your script modifications. It's already hard enough to maintain and improve the base script itself. I can only advice you to use fork and use your fork in the future.

<!-- gh-comment-id:169387970 --> @UltimateByte commented on GitHub (Jan 6, 2016): BTW, i don't see how we could give support on your script modifications. It's already hard enough to maintain and improve the base script itself. I can only advice you to use fork and use your fork in the future.
Author
Owner

@dgibbs64 commented on GitHub (Jan 6, 2016):

@JimTR yeah I think the best way moving forward is for you to fork LGSM then add your custom code. Then if you want to update your code from the master repo you can without LGSM master updates breaking your existing setup.

A recent version of LGSM added support for selecting a repo of your choice so you can use your own customized repo.

Hope that helps.

Also impressive work with your web interface!!

<!-- gh-comment-id:169391058 --> @dgibbs64 commented on GitHub (Jan 6, 2016): @JimTR yeah I think the best way moving forward is for you to fork LGSM then add your custom code. Then if you want to update your code from the master repo you can without LGSM master updates breaking your existing setup. A recent version of LGSM added support for selecting a repo of your choice so you can use your own customized repo. Hope that helps. Also impressive work with your web interface!!
Author
Owner

@dgibbs64 commented on GitHub (Jan 6, 2016):

Also seeing your custom code in your repo may allow me to implement the changes you made in to master repo.

<!-- gh-comment-id:169392232 --> @dgibbs64 commented on GitHub (Jan 6, 2016): Also seeing your custom code in your repo may allow me to implement the changes you made in to master repo.
Author
Owner

@JimTR commented on GitHub (Jan 6, 2016):

I have coded the interface ... I got hacked off with wordpress/mybb etc & spent the last 18 months coding a framework that does what I wanted ! then someone said 'can you control game servers' hence I'm here and the result is the images you see ... so process wise it works like this :- the web code auth's the user .. the php code then sends code to the game server (different machine & ip) using the Auth that the web code has E.G log into the web site as 'fred' you can see only what 'fred' owns ... so 'fred' opens his gmod server and clicks the restart button the web server sends a string to the game server containing '/home/fred/games/garrysmod/gmodserver restart' with the user Auth and other bits to ensure that the server could not be controlled via an intercept

<!-- gh-comment-id:169393688 --> @JimTR commented on GitHub (Jan 6, 2016): I have coded the interface ... I got hacked off with wordpress/mybb etc & spent the last 18 months coding a framework that does what I wanted ! then someone said 'can you control game servers' hence I'm here and the result is the images you see ... so process wise it works like this :- the web code auth's the user .. the php code then sends code to the game server (different machine & ip) using the Auth that the web code has E.G log into the web site as 'fred' you can see only what 'fred' owns ... so 'fred' opens his gmod server and clicks the restart button the web server sends a string to the game server containing '/home/fred/games/garrysmod/gmodserver restart' with the user Auth and other bits to ensure that the server could not be controlled via an intercept
Author
Owner

@UltimateByte commented on GitHub (Jan 6, 2016):

Amazing !

<!-- gh-comment-id:169394084 --> @UltimateByte commented on GitHub (Jan 6, 2016): Amazing !
Author
Owner

@JimTR commented on GitHub (Jan 6, 2016):

@dgibbs64 I will send you the code I have adjusted but perhaps it should not hit github ? & thanks for your feed back on the web stuff ... can you confirm what changes you have made & where so I could perhaps fork master and retro code it .... or is there a repro where the old code lives ?

<!-- gh-comment-id:169395639 --> @JimTR commented on GitHub (Jan 6, 2016): @dgibbs64 I will send you the code I have adjusted but perhaps it should not hit github ? & thanks for your feed back on the web stuff ... can you confirm what changes you have made & where so I could perhaps fork master and retro code it .... or is there a repro where the old code lives ?
Author
Owner

@JimTR commented on GitHub (Jan 6, 2016):

@UltimateByte currently the actual php game server code is 11.3kb but this relies on the framework code the size of the framework code depends on how many options but typically 50mb

<!-- gh-comment-id:169398999 --> @JimTR commented on GitHub (Jan 6, 2016): @UltimateByte currently the actual php game server code is 11.3kb but this relies on the framework code the size of the framework code depends on how many options but typically 50mb
Author
Owner

@dgibbs64 commented on GitHub (Jan 6, 2016):

All commits can be found here https://github.com/dgibbs64/linuxgsm/commits/master
So you just need to select the correct commit that you think will work

<!-- gh-comment-id:169402393 --> @dgibbs64 commented on GitHub (Jan 6, 2016): All commits can be found here https://github.com/dgibbs64/linuxgsm/commits/master So you just need to select the correct commit that you think will work
Author
Owner

@JimTR commented on GitHub (Jan 6, 2016):

ok cool

<!-- gh-comment-id:169402568 --> @JimTR commented on GitHub (Jan 6, 2016): ok cool
Author
Owner

@JimTR commented on GitHub (Jan 6, 2016):

@UltimateByte just thought I could do a mybb plugin that adds the game server to code to mybb ... but I'm not sure mybb is secure .... If I dowonload wordpress again perhaps I could put the code to a plugin but to again it's not as secure as I would like

<!-- gh-comment-id:169406769 --> @JimTR commented on GitHub (Jan 6, 2016): @UltimateByte just thought I could do a mybb plugin that adds the game server to code to mybb ... but I'm not sure mybb is secure .... If I dowonload wordpress again perhaps I could put the code to a plugin but to again it's not as secure as I would like
Author
Owner

@UltimateByte commented on GitHub (Jan 7, 2016):

@JimTR Don't know about mybb, i've always been using phpbb without issues, after setting some anti-robot registrationg ofc. :)
I first had only a phpbb forum, then made a wordpress and integrated the phpbb in it (with user links) thanks to wp-united, which is lovely. I'm not perfectly happy with the integration though, which i find quite ugly, but at least there's not too many CSS issues. I wish i'd know how to make WP addons to add functions to the local or to a remote machine... Maybe i'll follow your tracks one day... I've got more and more reasons to learn PHP these days.

<!-- gh-comment-id:169529116 --> @UltimateByte commented on GitHub (Jan 7, 2016): @JimTR Don't know about mybb, i've always been using phpbb without issues, after setting some anti-robot registrationg ofc. :) I first had only a phpbb forum, then made a wordpress and integrated the phpbb in it (with user links) thanks to wp-united, which is lovely. I'm not perfectly happy with the integration though, which i find quite ugly, but at least there's not too many CSS issues. I wish i'd know how to make WP addons to add functions to the local or to a remote machine... Maybe i'll follow your tracks one day... I've got more and more reasons to learn PHP these days.
Author
Owner

@JimTR commented on GitHub (Jan 7, 2016):

cool do it

<!-- gh-comment-id:169534569 --> @JimTR commented on GitHub (Jan 7, 2016): cool do it
Author
Owner

@UltimateByte commented on GitHub (Jan 7, 2016):

@JimTR OK let me 10 secs... https://www.youtube.com/watch?v=6vMO3XmNXe4
Doesn't work !

<!-- gh-comment-id:169669729 --> @UltimateByte commented on GitHub (Jan 7, 2016): @JimTR OK let me 10 secs... https://www.youtube.com/watch?v=6vMO3XmNXe4 Doesn't work !
Author
Owner

@JimTR commented on GitHub (Jan 7, 2016):

I must have missed the point ... but never mind ... I'm old humour me 💯

<!-- gh-comment-id:169710328 --> @JimTR commented on GitHub (Jan 7, 2016): I must have missed the point ... but never mind ... I'm old humour me :100:
Author
Owner

@UltimateByte commented on GitHub (Jan 9, 2016):

The point was "do it, go learn php" me acting as if it was easy "ok let me 10 secs", thought about this Matrix scene !

Is there anything more to develop, or should we close this ?

<!-- gh-comment-id:170165351 --> @UltimateByte commented on GitHub (Jan 9, 2016): The point was "do it, go learn php" me acting as if it was easy "ok let me 10 secs", thought about this Matrix scene ! Is there anything more to develop, or should we close this ?
Author
Owner

@JimTR commented on GitHub (Jan 12, 2016):

Learning PHP is easy if you put your mind to it & code for the command line ... it's not unlike C or Lua

<!-- gh-comment-id:170767086 --> @JimTR commented on GitHub (Jan 12, 2016): Learning PHP is easy if you put your mind to it & code for the command line ... it's not unlike C or Lua
Author
Owner

@jaredballou commented on GitHub (Jan 13, 2016):

I think there may be a common ground here we're not seeing. Perhaps something as simple as a "Bare Output Only" flag that disables all the ANSI color codes? I got bit by the same bug, I think it might be worthwhile to just write a script to list all the new files/functions and make a "deprecation script" that maps the old names to the new calls, should be fairly straightforward. Is there anything else in your fork that might be useful in the core scripts, we may be able to break it apart and have you focus on the Web UI and then be able to use the LGSM stock. Cut your workload down quite a bit anyway.

<!-- gh-comment-id:171124960 --> @jaredballou commented on GitHub (Jan 13, 2016): I think there may be a common ground here we're not seeing. Perhaps something as simple as a "Bare Output Only" flag that disables all the ANSI color codes? I got bit by the same bug, I think it might be worthwhile to just write a script to list all the new files/functions and make a "deprecation script" that maps the old names to the new calls, should be fairly straightforward. Is there anything else in your fork that might be useful in the core scripts, we may be able to break it apart and have you focus on the Web UI and then be able to use the LGSM stock. Cut your workload down quite a bit anyway.
Author
Owner

@JimTR commented on GitHub (Jan 14, 2016):

That's a good Idea ... the flag could remove non required CR's as well so you get a 'full' array back and don't have to check for array elements that are empty or contain cr

<!-- gh-comment-id:171793684 --> @JimTR commented on GitHub (Jan 14, 2016): That's a good Idea ... the flag could remove non required CR's as well so you get a 'full' array back and don't have to check for array elements that are empty or contain cr
Author
Owner

@jaredballou commented on GitHub (Jan 19, 2016):

Would it be easier to just dump all output to a file (or fifo) and parse it when you ingest it there? I usually don't like relying on others for input sanitation, if you want to show me what you're up to I may be able to lend a hand.

<!-- gh-comment-id:172970991 --> @jaredballou commented on GitHub (Jan 19, 2016): Would it be easier to just dump all output to a file (or fifo) and parse it when you ingest it there? I usually don't like relying on others for input sanitation, if you want to show me what you're up to I may be able to lend a hand.
Author
Owner

@UltimateByte commented on GitHub (Jan 22, 2016):

Closing this as the main issue has been solved.
For further discussions about a webpanel, please use this : https://github.com/dgibbs64/linuxgsm/issues/642

<!-- gh-comment-id:174074326 --> @UltimateByte commented on GitHub (Jan 22, 2016): Closing this as the main issue has been solved. For further discussions about a webpanel, please use this : https://github.com/dgibbs64/linuxgsm/issues/642
Author
Owner

@lock[bot] commented on GitHub (Jul 19, 2018):

This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

<!-- gh-comment-id:406332276 --> @lock[bot] commented on GitHub (Jul 19, 2018): This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.
Sign in to join this conversation.
No labels
Atomic
Epic
cannot reproduce
command: backup
command: console
command: debug
command: details
command: fast-dl
command: install
command: mods
command: monitor
command: post-details
command: restart
command: send
command: start
command: stop
command: update
command: update-lgsm
command: validate
command: wipe
distro: AlmaLinux
distro: Arch Linux
distro: CentOS
distro: Debian
distro: Fedora
distro: RedHat
distro: Rocky Linux
distro: Ubuntu
distro: openSUSE
engine: goldsrc
engine: source
game: 7 Days to Die
game: ARMA 3
game: Ark: Survival Evolved
game: Assetto Corsa
game: Avorion
game: BATTALION: Legacy
game: Barotrauma
game: Battalion 1944
game: Battlefield 1942
game: Black Mesa: Deathmatch
game: Blade Symphony
game: Call of Duty 2
game: Call of Duty 4
game: Call of Duty: United Offensive
game: Counter-Strike 1.6
game: Counter-Strike 2
game: Counter-Strike: Global Offensive
game: Counter-Strike: Source
game: Day of Infamy
game: Dayz
game: Death Match Classic
game: Don't Starve Together
game: ET: Legacy
game: Eco
game: Factorio
game: Factorio
game: Garry's Mod
game: Half-Life
game: Hurtword
game: Insurgecy
game: Insurgecy
game: Insurgency: Sandstorm
game: Just Cause 3
game: Killing Floor
game: Killing Floor 2
game: Left 4 Dead 2
game: Minecraft
game: Minecraft Bedrock
game: Mordhau
game: Multi Theft Auto
game: Mumble
game: Natural Selection 2
game: No More Room in Hell
game: Pavlov VR
game: Post Scriptum
game: Project Zomboid
game: Quake 3
game: QuakeWorld
game: Red Orchestra: Ostfront 41-45
game: Return to Castle Wolfenstein
game: Rising World
game: Rust
game: San Andreas Multiplayer
game: Satisfactory
game: Soldat
game: Soldier of Fortune 2
game: Squad
game: Squad 44
game: Starbound
game: Stationeers
game: Sven Co-op
game: Team Fortress 2
game: Teamspeak 3
game: Teeworlds
game: Terraria
game: The Front
game: Unreal Tournament 2004
game: Unreal Tournament 3
game: Unreal Tournament 99
game: Unturned
game: Valheim
game: Wurm Unlimited
game: Zombie Master Reborn
game: label missing
good first issue
help wanted
info: alerts
info: dependency
info: docker
info: docs
info: email
info: query
info: steamcmd
info: systemd
info: tmux
info: website
info: website
needs more info
outcome: duplicate
outcome: issue resolved
outcome: issue resolved
outcome: issue unresolved
outcome: pr accepted
outcome: pr rejected
outcome: unconfirmed
outcome: wontfix
outcome: wrong forum
potential-duplicate
priority
pull-request
type: bug
type: feature
type: feature
type: feature request
type: game server request
type: refactor
waiting response
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/LinuxGSM#489
No description provided.