Enigmatica 6 - E6 - 1.16.5

Enigmatica 6 - E6 - 1.16.5

1M Downloads

Multiple powershell script errors in automation folder

JoaGamo opened this issue ยท 3 comments

commented

Modpack Version

0.5.26

Describe your issue.

All this is tested under a Linux Ubuntu server 20.04 and the latest 0.5.26 E6 version downloaded from the releases section.
Start: First I didnt knew that I needed powershell in the first place and took me a few minutes to figure out. Adding a "requires git and powershell" in the server automation instructions would help for the future.

1st error) command "powershell" does not exist anymore and causes scripts to skip the command, breaking the system. I installed powershell using the official method from Microsoft ( https://docs.microsoft.com/en-us/powershell/scripting/install/installing-powershell-on-linux?view=powershell-7.2 ) and now the command is called "pwsh" instead of powershell

This is fixed by changing ALL powershell entries to pwsh
So far I know 2 spots where "powershell" is present in bash scripts, in "start-automated-server.sh" and "update-and-start-server.sh" . changing them to pwsh fixed this minor issue.

2nd error) In the update-server.ps1 the files to copy are typed like "automation/xthefilex". considering the script is already running from the automation folder, it looks for stuff in enigmatica6/automation/automation, you know where this goes.
I half-fixed this by changing all automation entries to nothing, my update-server.ps1 in this part looks like this

function Move-ServerFiles {
Write-Host
Write-Host "Copying server files to base folder..." -ForegroundColor Cyan
Write-Host "This will overwrite existing files." -ForegroundColor Gray
@(
"settings.cfg",
"start-automated-server.bat",
"start-automated-server.sh"
) | ForEach-Object {
$splitFileName = $_ -split "/"
$fileName = $splitFileName[$splitFileName.length - 1]
$destination = "$fileName"
Write-Host "Moving '$fileName' to the base folder."
Copy-Item -Path $_ -Destination $destination -Force
}
}
But.
There's a line below this called "function Remove-ClientOnlyMods" that I didnt fix and I honestly dont know how.

3rd error) In the server-update.ps1 script, git fails to download. "fatal: not a git repository (or any of the parent directories): .git
fatal: not a git repository (or any of the parent directories): .git"
This last error is out of my little-near-zero knowledge about powershell and I can't fix it myself.

Minor issue that I can't test if its relevant or not, in settings.ps1 in automation folder my $modpack_version shows as 0.5.25 instead of 0.5.26.

Crash Report

No response

Latest Log

No response

Have you modified the modpack?

No

User Modifications

No response

Did the issue happen in singleplayer or on a server?

Server

commented

1st error) command "powershell" does not exist anymore and causes scripts to skip the command, breaking the system. I installed powershell using the official method from Microsoft ( https://docs.microsoft.com/en-us/powershell/scripting/install/installing-powershell-on-linux?view=powershell-7.2 ) and now the command is called "pwsh" instead of powershell

Fixed in-dev, thanks ๐Ÿ‘

2nd error) In the update-server.ps1 the files to copy are typed like "automation/xthefilex". considering the script is already running from the automation folder, it looks for stuff in enigmatica6/automation/automation, you know where this goes.
I half-fixed this by changing all automation entries to nothing, my update-server.ps1 in this part looks like this

The script sets it's own location to the root of your instance. Which issues did you experience with this / how did you run the script?

3rd error) In the server-update.ps1 script, git fails to download. "fatal: not a git repository (or any of the parent directories): .git
fatal: not a git repository (or any of the parent directories): .git"
This last error is out of my little-near-zero knowledge about powershell and I can't fix it myself.

Did you get the files by using git clone? :)

Minor issue that I can't test if its relevant or not, in settings.ps1 in automation folder my $modpack_version shows as 0.5.25 instead of 0.5.26.

Irrelevant, that is caused by a flaw in my continous deployment setup ^^'

commented

Hello, I didnt use "git clone" to download, I did wget [.zip github file] in my console. Sorry but I didnt knew that, it wasnt specified in the "server automation manual" (here) how to properly do that.

About the 2nd error, I uncompressed the .zip file and I went into automation folder, following the manual, I ran instancesync.sh then the update-and-start-server.sh, which I had to modify the powershell script to work inside the pre-defined folder.
If the script is already correct, then it should be moved to the root folder where its supposed to be instead of the default 'automation' folder location.

commented

May I ask which manual/guide you used for this?
I recommend you follow the guide from our wiki in the future: https://wiki.enigmatica.net/main/help-desk/guides/automatic-server-updates

An easier way to keep your server running on the latest modpack version. Follow the below steps to be able to update modpack version with only a few clicks.