Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Create installer script for Debian/Ubuntu #985

Merged
2 commits merged into from
May 19, 2022
Merged

Create installer script for Debian/Ubuntu #985

2 commits merged into from
May 19, 2022

Conversation

TurtleIdiot
Copy link
Contributor

@TurtleIdiot TurtleIdiot commented May 19, 2022

Description

Please carefully read the Contributing note and Code of conduct before making any pull requests.
And, Do not make a pull request to merge into stable unless it is a hotfix. Use the development branch instead.

Issues fixed by this PR

This PR is an installer script for Debian/Ubuntu linux

What the script does (in order):

  • Installs dependencies the script needs to fetch and set up grasscutter (curl, wget, openssl, unzip, git)
  • Installs dependencies for grasscutter (mongodb, openjdk-17-jre)
  • Fetches latest stable action build using nightly link
  • Fetches data and keys from main repo using a sparse/partial checkout
  • Runs -handbook to generate handbook and config.json
  • Replaces 127.0.0.1 in config.json with IP obtained from user prompt
  • Generates self-signed CA and SSL certificates and keystore.p12 (see below)
  • Cleans up temporary files

Why a custom keystore.p12 is generated:
When I was manually installing gc on my linux server, the title screen door animation would play and then say "Connection timed out"
This is because the default keystore.p12 is generated for localhost only.
The script generates a keystore.p12 with the correct IP address

Running:

mkdir gc-autoinstall
cd gc-autoinstall
wget https://github.com/TurtleIdiot/Grasscutter/raw/development/install.sh
chmod +x ./install.sh
sudo ./install.sh

Type of changes

  • Bug fix
  • New feature
  • Enhancement
  • Documentation

Checklist:

  • My code follows the style guidelines of this project
  • My pull request is unique and no other pull requests have been opened for these changes
  • I have read the Contributing note and Code of conduct
  • I am responsible for any copyright issues with my code if it occurs in the future.

I might add support for other distros/package managers later
@TurtleIdiot
Copy link
Contributor Author

I'll upload a video of the install process tomorrow

@mingjun97
Copy link
Contributor

Could the usage be something like sh -c "$(curl -fsSL https://github.com/TurtleIdiot/Grasscutter/raw/development/install.sh)"?

@TurtleIdiot
Copy link
Contributor Author

As long as the script is executed as sudo, it should work

@ghost ghost merged commit a72d10e into Grasscutters:development May 19, 2022
@YorhaX2P
Copy link

As long as the script is executed as sudo, it should work

I got error when I tried to install sudo ./install.sh

Please select the branch you wish to install
2) development

Do you wish to proceed and install grasscutter?

  1. Yes

Updating package cache...
Installing setup dependencies...
Done
Installing grasscutter dependencies...
E: Package 'mongodb' has no installation candidate

What I can do?

@TurtleIdiot
Copy link
Contributor Author

E: Package 'mongodb' has no installation candidate

What distro are you on?

@YorhaX2P
Copy link

I am on Ubuntu 22.04.3 LTS

No LSB modules are available.
Distributor ID: Ubuntu
Description:    Ubuntu 22.04.3 LTS
Release:        22.04
Codename:       jammy

This pull request was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants