-
Notifications
You must be signed in to change notification settings - Fork 59
Conditioned aliases/options #364
Comments
I've 0 idea what you mean, can you explain? If you want changable options, use variables I've no idea what you want with changable aliases |
Variables as options work, but they are less neat and less practical, and they aren't useful for aliases. options: Same with aliases. I have many servers that all use the same scripts, and instead of every server having duplicated files, all script folders are linked to 1 central server instead, so they all load the same script folder. This is so I don't have to add/remove/edit scripts on 10 different servers every time I change something. This doesn't work with some of my scripts that use some aliases/options which vary between servers, so I'd like to be able to do: aliases: This way I can still have just 1 central file but have the aliases/options conditioned for each server. |
The options section is directly what variables are used for :P You can set them, or just use them :-) I use an "On script load" event to load up variables as the script gets reloaded. Something like: on script load: The centralized skripts thing is good, I tried and failed to do that before, how are you doing it? We had 5 machines and were running a cron job to mirror the folders across multiple machines, but kept running into security issues and it getting rejected on certain machines each time. |
Yeah I know I can use variables for options and that's how I set them too, this is mainly for aliases though. Using a banned items script as an example, on different modpacks the "BannedItem" alias is different since each pack as different items with different IDs. Currently I have that script duplicated on each server with separate settings, which is a pain, I'd like to have it in my central script folder and just have it set the alias based on which server is loading it. Not sure about multiple machines, but I just have one linux server, and I centralized the scripts by creating a symbolic link in every mc server script folder which links to the central scripts folder so they share all of the files in it. |
I have a centralized AND local script folder for each machine.. While i can
|
Hello Smooch long time no see <3 |
How are you guys mirriring the folders? |
I'm not mirroring anything, I told you I'm using a symbolic link. A symbolic link points a directory to another directory, basically linking them. If you have server1/plugins/Skript/scripts/LinkedScripts and you create a symbolic link in server2/plugins/Skript/scripts named "LinkedScripts"(link name can be anything) to server1/plugins/Skript/scripts/LinkedScripts, then any scripts in the LinkedScripts folder on server1 will be loaded by server2 because it's linked to server1. |
Like this? http://help.hardhathosting.com/question.php/95 So the server will act like the symbolically linked folder is apart of it's own directory and load the skripts from the central location? |
Yes and yes. As far as file permissions go, the symlink permission doesn't matter, but the server will need permission to the files inside the linked folder. |
@MostFunGuy yeah.. I still lurk around :P. And symbolic links will work On single machine.. But to have the same folder shared across multiple physical machines, it requires publishing/sharing the folder and then mounting it on the other machine. A little tricky.. But works nice once you get it set up. DISCLAIMER I can only confirms that this work with linux servers.. If you are working on a windows server (why?) i cant gurantee anything. |
It would be awesome if aliases and options could be set based on certain conditions.
The text was updated successfully, but these errors were encountered: