hexparrot/mineos

Server Restart - Copying Profile

Closed this issue · 3 comments

When you restart the server, it will copy over files from the profile that are missing. I would like there to be an option to disable this. I run a FTB server, and I disabled a mod by renaming it to blah.jar.disabled. Only to find on restart it popped back up. I deleted it from profile, and from server folder, and it didn't come back.

In theory, that sounds nice, but I'm not sure how it would be implemented technically without also requiring some additional measures to remember what files to ignore, and that makes the design much more complicated (and less clean for all users) than the alternative option described below.

When a profile is updated--whether there are new files put in the /profiles/profilename directory or renamed, MineOS makes the assumption that that now is the setup that the profile should be and it should be replicated for existing servers and future ones.

As an example, a profile "amazoprofile" that has (in its /profile directory):

  • a.jar
  • b.jar
  • c.jar

Any time a server is assigned "amazoprofile" is *_guaranteed *_to have a.jar, b.jar, c.jar. By virtue of it being in the profile directory, that is the promise MineOS makes about profile assignments.

If these three files don't belong in all instances of servers you create assigned "amazoprofile", then it doesn't belong in the template profile, either. So if c.jar belongs only one 1 server, then c.jar should be deleted/moved away from the profile directory and dropped in to that second directory's server only.

Alternatively, make your profile have c.jar be c.jar.disabled (in the profile directory). And--as you need it--rename/symlink that particular file to c.jar in the server directory.

First, I meant to make this issue on the node version... I am an idiot...

Anyways, I understand what your saying to an extent. What I want is an option to ignore updating a profile for a whole server, not just certain files.

https://github.com/hexparrot/mineos-node/blob/master/mineos.js @ line 794 change from this:
} else if (changed_files) self.copy_profile(cb); else
to something like this
} else if (changed_files && !server.ignoreChangedFiles) self.copy_profile(cb); else

And then just add an option in the UI under the profile select button for the ignore changed files. That way it disabled profile updating as a while for the entire server.

If this is still an issue you want addressed, you can repost it under the mineos-node git repo. Otherwise, as far as this is concerned:

What I want is an option to ignore updating a profile for a whole server, not just certain files.

You can simply change the dropdown to 'select profile' (effectively "no profile") in mineos-node, which ignores updating profiles ever again. Profiles aren't necessary in any scenarios--they are merely shortcuts to get commonly-used and easily-downloadable jars into the correct server directory.