arkmanager / ark-server-tools

Set of server tools used to manage ARK: Survival Evolved servers on Linux
MIT License
680 stars 144 forks source link

Disable updating and uninstalling if installed through package manager #1124

Closed chriscpritchard closed 4 years ago

chriscpritchard commented 4 years ago

I have added a variable within the script that can be set to 1 (via a patch, most likely) if the program is installed through a system package manager. This modifies the doUpgradeTools() and doUninstallTools() functions to advise a user to uninstall or install through the system's package manager.

This is not intended to be user-configurable (hence not including inside the config file), instead it should be set by the downstream maintainers during packaging.

resolves #1125

klightspeed commented 4 years ago

Perhaps change the default value of arkstUsePkgManager to '', then arkstUsePkgManager can be added to the variables cleared when calculating the blob SHA - https://github.com/FezVrasta/ark-server-tools/blob/master/tools/arkmanager#L3752

klightspeed commented 4 years ago

Argh - the comment after '' means that the following won't work:

echo "Blob SHA: $( (echo -ne "blob ${blobsize}\0"; sed "s@^\\(arkst\\(Commit\\|Tag\\|RootUseEnv\\|UsePkgManager\\)\\)=.*@\\1=''@" "$0") | sha1sum | cut -d' ' -f1)"
chriscpritchard commented 4 years ago

Feel free to remove or move the comment I guess! I was about to do it but you've merged the branch!

klightspeed commented 4 years ago

b230c4f updates and comments the overrides.