1
0
Fork 0
mirror of https://github.com/YunoHost-Apps/minetest_ynh.git synced 2024-09-03 20:36:00 +02:00

Merge pull request #36 from YunoHost-Apps/upgrade

Upgrade
This commit is contained in:
yalh76 2022-06-23 13:18:19 +02:00 committed by GitHub
commit 98c23bc2a0
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
15 changed files with 3509 additions and 302 deletions

View file

@ -1,51 +1,35 @@
<!--
N.B.: This README was automatically generated by https://github.com/YunoHost/apps/tree/master/tools/README-generator
It shall NOT be edited by hand.
-->
# Minetest for YunoHost
[![Integration level](https://dash.yunohost.org/integration/minetest.svg)](https://dash.yunohost.org/appci/app/minetest) ![](https://ci-apps.yunohost.org/ci/badges/minetest.status.svg) ![](https://ci-apps.yunohost.org/ci/badges/minetest.maintain.svg)
[![Integration level](https://dash.yunohost.org/integration/minetest.svg)](https://dash.yunohost.org/appci/app/minetest) ![Working status](https://ci-apps.yunohost.org/ci/badges/minetest.status.svg) ![Maintenance status](https://ci-apps.yunohost.org/ci/badges/minetest.maintain.svg)
[![Install Minetest with YunoHost](https://install-app.yunohost.org/install-with-yunohost.svg)](https://install-app.yunohost.org/?app=minetest)
*[Lire ce readme en français.](./README_fr.md)*
> *This package allow you to install Minetest quickly and simply on a YunoHost server.
If you dont have YunoHost, please see [here](https://yunohost.org/#/install) to know how to install and enjoy it.*
> *This package allows you to install Minetest quickly and simply on a YunoHost server.
If you don't have YunoHost, please consult [the guide](https://yunohost.org/#/install) to learn how to install it.*
## Overview
Minetest is a free open-source voxel game engine with easy modding and game creation.
**Shipped version:** 5.4.1
**Shipped version:** 5.5.1~ynh1
## Screenshots
![](https://www.minetest.net/media/gallery/1.jpg)
![Screenshot of Minetest](./doc/screenshots/1.jpg)
## Demo
No demo but you can test with servers in https://servers.minetest.net/
## Disclaimers / important information
## Configuration
How to configure this app: by SSH
## Documentation
* Official documentation: https://wiki.minetest.net/
* YunoHost documentation: https://yunohost.org/en/app_minetest
## YunoHost specific features
#### Multi-users support
* Are LDAP and HTTP auth supported? **No**
* Can the app be used by multiple users? **Yes**
#### Supported architectures
* x86-64 - [![Build Status](https://ci-apps.yunohost.org/ci/logs/minetest.svg)](https://ci-apps.yunohost.org/ci/apps/minetest/)
* ARMv8-A - [![Build Status](https://ci-apps-arm.yunohost.org/ci/logs/minetest.svg)](https://ci-apps-arm.yunohost.org/ci/apps/minetest/)
## Limitations
* This app is not compatible with LDAP.
## Additional information
* Migration from old package
@ -65,23 +49,23 @@ How to configure this app: by SSH
* Restart Minetest with `sudo systemctl restart minetest`
* The mod is now installed :)
## Documentation and resources
## Links
* Official app website: <http://www.minetest.net>
* Upstream app code repository: <https://github.com/minetest/minetest>
* YunoHost documentation for this app: <https://yunohost.org/app_minetest>
* Report a bug: <https://github.com/YunoHost-Apps/minetest_ynh/issues>
* Report a bug: https://github.com/YunoHost-Apps/minetest_ynh/issues
* App website: https://www.minetest.net/
* Upstream app repository: https://github.com/minetest/minetest
* YunoHost website: https://yunohost.org/
## Developer info
---
## Developers info
Please do your pull request to the [testing branch](https://github.com/YunoHost-Apps/minetest_ynh/tree/testing).
Please send your pull request to the [testing branch](https://github.com/YunoHost-Apps/minetest_ynh/tree/testing).
To try the testing branch, please proceed like that.
```
``` bash
sudo yunohost app install https://github.com/YunoHost-Apps/minetest_ynh/tree/testing --debug
or
sudo yunohost app upgrade minetest -u https://github.com/YunoHost-Apps/minetest_ynh/tree/testing --debug
```
**More info regarding app packaging:** <https://yunohost.org/packaging_apps>

View file

@ -1,51 +1,35 @@
# Minetest for YunoHost
<!--
N.B.: This README was automatically generated by https://github.com/YunoHost/apps/tree/master/tools/README-generator
It shall NOT be edited by hand.
-->
[![Niveau dintégration](https://dash.yunohost.org/integration/minetest.svg)](https://dash.yunohost.org/appci/app/minetest) ![](https://ci-apps.yunohost.org/ci/badges/minetest.status.svg) ![](https://ci-apps.yunohost.org/ci/badges/minetest.maintain.svg)
# Minetest pour YunoHost
[![Niveau d'intégration](https://dash.yunohost.org/integration/minetest.svg)](https://dash.yunohost.org/appci/app/minetest) ![Statut du fonctionnement](https://ci-apps.yunohost.org/ci/badges/minetest.status.svg) ![Statut de maintenance](https://ci-apps.yunohost.org/ci/badges/minetest.maintain.svg)
[![Installer Minetest avec YunoHost](https://install-app.yunohost.org/install-with-yunohost.svg)](https://install-app.yunohost.org/?app=minetest)
*[Read this readme in English.](./README.md)*
*[Read this readme in english.](./README.md)*
> *Ce package vous permet dinstaller Minetest rapidement et simplement sur un serveur YunoHost.
Si vous navez pas YunoHost, veuillez consulter [ici](https://yunohost.org/#/install) pour savoir comment linstaller et en profiter.*
> *Ce package vous permet d'installer Minetest rapidement et simplement sur un serveur YunoHost.
Si vous n'avez pas YunoHost, regardez [ici](https://yunohost.org/#/install) pour savoir comment l'installer et en profiter.*
## Vue d'ensemble
## Aperçu
Minetest est un moteur de jeu voxel open-source avec modding et création de jeux faciles.
**Version incluse:** 5.4.1
## Captures décran
**Version incluse :** 5.5.1~ynh1
![](https://www.minetest.net/media/gallery/1.jpg)
## Captures d'écran
## Démo
![Capture d'écran de Minetest](./doc/screenshots/1.jpg)
Il n'y a pas de démo mais vous pouvez tester avec des serveurs sur https://servers.minetest.net/
## Avertissements / informations importantes
## Configuration
Comment configurer cette application : par SSH
## Documentation
* Documentation officielle : https://wiki.minetest.net/
* Documentation YunoHost : https://yunohost.org/fr/app_minetest
## Caractéristiques spécifiques YunoHost
#### Support multi-utilisateurs
* Les authentifications LDAP et HTTP sont-elles prises en charge ? **Non**
* Lapplication peut-elle être utilisée par plusieurs utilisateurs ? **Oui**
##### Architectures supportées
* x86-64 - [![Build Status](https://ci-apps.yunohost.org/ci/logs/minetest.svg)](https://ci-apps.yunohost.org/ci/apps/minetest/)
* ARMv8-A - [![Build Status](https://ci-apps-arm.yunohost.org/ci/logs/minetest.svg)](https://ci-apps-arm.yunohost.org/ci/apps/minetest/)
## Limitations
* Cette application nest pas compatible avec LDAP.
## Renseignements supplémentaires
* Migration de lancien paquet
@ -65,22 +49,23 @@ Comment configurer cette application : par SSH
* Redémarrez Minetest avec `sudo systemctl restart minetest`
* Le mod est maintenant installé :)
## Liens
## Documentations et ressources
* Signaler un bug : https://github.com/YunoHost-Apps/minetest_ynh/issues
* Site de lapplication : https://www.minetest.net/
* Dépôt de lapplication principale : https://github.com/minetest/minetest
* Site web de YunoHost : https://yunohost.org/
---
* Site officiel de l'app : <http://www.minetest.net>
* Dépôt de code officiel de l'app : <https://github.com/minetest/minetest>
* Documentation YunoHost pour cette app : <https://yunohost.org/app_minetest>
* Signaler un bug : <https://github.com/YunoHost-Apps/minetest_ynh/issues>
## Informations pour les développeurs
Merci de faire vos pull request sur la [branche testing](https://github.com/YunoHost-Apps/minetest_ynh/tree/testing).
Pour essayer la branche testing, procédez comme suit.
```
``` bash
sudo yunohost app install https://github.com/YunoHost-Apps/minetest_ynh/tree/testing --debug
ou
sudo yunohost app upgrade minetest -u https://github.com/YunoHost-Apps/minetest_ynh/tree/testing --debug
```
**Plus d'infos sur le packaging d'applications :** <https://yunohost.org/packaging_apps>

View file

@ -1,13 +1,12 @@
;; Test complet minetest_game
; Manifest
domain="domain.tld"
pvp=1
servername="packagecheck"
is_public=0
game="minetest_game"
servername="packagecheck"
pvp=1
creative=0
damage=1
is_public=0
password="pass"
port="30000"
; Checks
pkg_linter=1
@ -27,15 +26,14 @@
;; Test complet capturetheflag
; Manifest
domain="domain.tld" (DOMAIN)
pvp=1
servername="packagecheck"
domain="domain.tld"
is_public=0
game="capturetheflag"
servername="packagecheck"
pvp=1
creative=0
damage=1
is_public=0 (PUBLIC|public=1|private=0)
password="pass"
port="30000" (PORT)
port="30000"
; Checks
pkg_linter=1
setup_sub_dir=0

View file

@ -1,7 +1,7 @@
SOURCE_URL=https://github.com/minetest/minetest/archive/5.4.1.tar.gz
SOURCE_SUM=de9e4410583c845c104b4be25f9d0b8743d8573c120149b8910ae2519f9ab14e
SOURCE_URL=https://github.com/minetest/minetest/archive/5.5.1.tar.gz
SOURCE_SUM=dc0ae5188ef351db85c38b27f38f8549b133ed82aa46daea6deee148aa3454f4
SOURCE_SUM_PRG=sha256sum
SOURCE_FORMAT=tar.gz
SOURCE_IN_SUBDIR=true
SOURCE_FILENAME=minetest-5.4.1.tar.gz
SOURCE_FILENAME=minetest-5.5.1.tar.gz
SOURCE_EXTRACT=true

File diff suppressed because it is too large Load diff

View file

@ -1,6 +1,7 @@
SOURCE_URL=https://github.com/minetest/minetest_game/archive/5.4.1.tar.gz
SOURCE_SUM=b4bfa0755b88230cf4bdb6af6a0951dd1248f6cdf87fecc340e43ac12c80b0b2
SOURCE_URL=https://github.com/minetest/minetest_game/archive/5.5.1.tar.gz
SOURCE_SUM=5a24fec4ed838744906f020096c35616e7ba76eeec2b93b980a40af011107e7c
SOURCE_SUM_PRG=sha256sum
SOURCE_FORMAT=tar.gz
SOURCE_IN_SUBDIR=true
SOURCE_FILENAME=minetest_game-5.4.1.tar.gz
SOURCE_FILENAME=minetest_game-5.5.1.tar.gz
SOURCE_EXTRACT=true

View file

@ -8,7 +8,7 @@ RequiresMountsFor=/home/yunohost.app/__APP__
Restart=on-failure
User=__APP__
Group=__APP__
ExecStart=__FINALPATH__/bin/minetestserver --config /home/yunohost.app/__APP__/.minetest/minetest.conf --logfile /var/log/__APP__/__APP__.log
ExecStart=__FINALPATH__/bin/minetestserver --config __DATADIR__/.minetest/minetest.conf --logfile /var/log/__APP__/__APP__.log
# Sandboxing options to harden security
# Depending on specificities of your service/app, you may need to tweak these

View file

@ -6,7 +6,7 @@ How to configure this app: by SSH
* Migration from old package
* You cant migrate directly with an update.
* You cant migrate directly with an update.
* Before installing the new package you need to download this folder from your server `/var/games/minetest-server/.minetest/worlds/world` (this folder contains all world data)
* Uninstall the old package `sudo yunohost app remove minetest`
* Install the new one `sudo yunohost app install https://github.com/YunoHost-Apps/minetest_ynh`

View file

@ -6,7 +6,7 @@
"en": "Free, open source voxel game engine and game. Need a client to connect to the server.",
"fr": "Moteur de jeu de type « bac à sable » gratuit et open source. Nécessite un client pour se connecter au serveur."
},
"version": "5.4.1~ynh2",
"version": "5.5.1~ynh1",
"url": "http://www.minetest.net/",
"upstream": {
"license": "MIT",
@ -32,7 +32,7 @@
"nginx"
],
"arguments": {
"install" : [
"install": [
{
"name": "domain",
"type": "domain"

View file

@ -5,7 +5,7 @@
#=================================================
# dependencies used by the app
pkg_dependencies="build-essential libirrlicht-dev cmake libbz2-dev libpng-dev libjpeg-dev libxxf86vm-dev libgl1-mesa-dev libsqlite3-dev libogg-dev libvorbis-dev libopenal-dev libcurl4-dev libfreetype6-dev zlib1g-dev libgmp-dev libjsoncpp-dev libluajit-5.1-dev"
pkg_dependencies="build-essential libirrlicht-dev cmake libbz2-dev libpng-dev libjpeg-dev libxxf86vm-dev libgl1-mesa-dev libsqlite3-dev libogg-dev libvorbis-dev libopenal-dev libcurl4-dev libfreetype6-dev zlib1g-dev libgmp-dev libjsoncpp-dev libluajit-5.1-dev libncurses-dev libzstd-dev"
#=================================================
# PERSONAL HELPERS

View file

@ -28,7 +28,7 @@ ynh_print_info --message="Loading installation settings..."
app=$YNH_APP_INSTANCE_NAME
final_path=$(ynh_app_setting_get --app=$app --key=final_path)
home_path=$(ynh_app_setting_get --app=$app --key=home_path)
datadir=$(ynh_app_setting_get --app=$app --key=datadir)
#=================================================
# DECLARE DATA AND CONF FILES TO BACKUP
@ -41,6 +41,12 @@ ynh_print_info --message="Declaring files to be backed up..."
ynh_backup --src_path="$final_path"
#=================================================
# BACKUP THE DATA DIR
#=================================================
ynh_backup --src_path="$datadir" --is_big
#=================================================
# SPECIFIC BACKUP
#=================================================
@ -55,12 +61,6 @@ ynh_backup --src_path="/etc/logrotate.d/$app"
ynh_backup --src_path="/etc/systemd/system/$app.service"
#=================================================
# BACKUP THE HOME DIR
#=================================================
ynh_backup --src_path="$home_path" --is_big
#=================================================
# END OF SCRIPT
#=================================================

View file

@ -26,10 +26,10 @@ ynh_abort_if_errors
domain=$YNH_APP_ARG_DOMAIN
is_public=$YNH_APP_ARG_IS_PUBLIC
game=$YNH_APP_ARG_GAME
servername=$YNH_APP_ARG_SERVERNAME
pvp=$YNH_APP_ARG_PVP
creative=$YNH_APP_ARG_CREATIVE
damage=$YNH_APP_ARG_DAMAGE
servername=$YNH_APP_ARG_SERVERNAME
app=$YNH_APP_INSTANCE_NAME
@ -48,10 +48,10 @@ ynh_script_progression --message="Storing installation settings..."
ynh_app_setting_set --app=$app --key=domain --value=$domain
ynh_app_setting_set --app=$app --key=game --value=$game
ynh_app_setting_set --app=$app --key=servername --value=$servername
ynh_app_setting_set --app=$app --key=pvp --value=$pvp
ynh_app_setting_set --app=$app --key=creative --value=$creative
ynh_app_setting_set --app=$app --key=damage --value=$damage
ynh_app_setting_set --app=$app --key=servername --value=$servername
#=================================================
# STANDARD MODIFICATIONS
@ -63,6 +63,7 @@ ynh_script_progression --message="Finding an available port..."
# Find an available port
port=$(ynh_find_port 30000)
ynh_app_setting_set --app=$app --key=port --value=$port
# Open the port
ynh_script_progression --message="Configuring firewall..."
ynh_exec_warn_less yunohost firewall allow --no-upnp UDP $port
@ -79,16 +80,8 @@ ynh_install_app_dependencies $pkg_dependencies
#=================================================
ynh_script_progression --message="Configuring system user..."
home_path=/home/yunohost.app/$app
ynh_app_setting_set --app=$app --key=home_path --value=$home_path
# Create a system user
ynh_system_user_create --username=$app --home_dir=$home_path --use_shell
mkdir -p "$home_path"
chmod 750 "$home_path"
chmod -R o-rwx "$home_path"
chown -R $app:$app "$home_path"
ynh_system_user_create --username=$app --home_dir="$final_path"
#=================================================
# DOWNLOAD, CHECK AND UNPACK SOURCE
@ -106,27 +99,25 @@ chown -R $app:$app "$final_path"
#=================================================
# SPECIFIC SETUP
#=================================================
# ADD A CONFIGURATION
# CREATE DATA DIRECTORY
#=================================================
ynh_script_progression --message="Adding a configuration file..."
ynh_script_progression --message="Creating a data directory..."
mkdir -p $home_path/.minetest/worlds/
cp -a ../conf/minetest.conf $home_path/.minetest/
datadir=/home/yunohost.app/$app
ynh_app_setting_set --app=$app --key=datadir --value=$datadir
#=================================================
# SETUP SYSTEMD
#=================================================
ynh_script_progression --message="Configuring a systemd service..."
mkdir -p $datadir
mkdir -p "$datadir/.minetest/worlds/"
# Create a dedicated systemd config
ynh_add_systemd_config
chmod 750 "$datadir"
chmod -R o-rwx "$datadir"
chown -R $app:www-data "$datadir"
#=================================================
# BUILDING
#=================================================
ynh_script_progression --message="Building Minetest..."
# Install the game
if [ $game = "capturetheflag" ]; then
pushd $final_path
@ -144,31 +135,28 @@ pushd $final_path
popd
#=================================================
# MODIFY A CONFIG FILE
# ADD A CONFIGURATION
#=================================================
ynh_script_progression --message="Adding a configuration file..."
### `ynh_replace_string` is used to replace a string in a file.
### (It's compatible with sed regular expressions syntax)
# Install the game
if [ $is_public -eq 1 ]; then
announce="true"
else
announce="false"
fi
ynh_add_config --template="../conf/minetest.conf" --destination="$home_path/.minetest/minetest.conf"
ynh_add_config --template="../conf/minetest.conf" --destination="$datadir/.minetest/minetest.conf"
chmod 400 "$datadir/.minetest/minetest.conf"
chown $app:$app "$datadir/.minetest/minetest.conf"
#=================================================
# CREATE LOG DIRECTORY
# SETUP SYSTEMD
#=================================================
ynh_script_progression --message="Creating log directory..."
ynh_script_progression --message="Configuring a systemd service..."
mkdir -p /var/log/$app
# Set permissions on logs
chown -R $app:$app /var/log/$app
# Create a dedicated systemd config
ynh_add_systemd_config
#=================================================
# GENERIC FINALIZATION
@ -177,6 +165,9 @@ chown -R $app:$app /var/log/$app
#=================================================
ynh_script_progression --message="Configuring log rotation..."
mkdir -p /var/log/$app
chown -R $app:$app /var/log/$app
# Use logrotate to manage application logfile(s)
ynh_use_logrotate

View file

@ -18,7 +18,7 @@ app=$YNH_APP_INSTANCE_NAME
port=$(ynh_app_setting_get --app=$app --key=port)
final_path=$(ynh_app_setting_get --app=$app --key=final_path)
home_path=$(ynh_app_setting_get --app=$app --key=home_path)
datadir=$(ynh_app_setting_get --app=$app --key=datadir)
#=================================================
# STANDARD REMOVE
@ -57,6 +57,17 @@ ynh_script_progression --message="Removing app main directory..."
# Remove the app directory securely
ynh_secure_remove --file="$final_path"
#=================================================
# REMOVE DATA DIR
#=================================================
# Remove the data directory if --purge option is used
if [ "${YNH_APP_PURGE:-0}" -eq 1 ]
then
ynh_script_progression --message="Removing app data directory..."
ynh_secure_remove --file="$datadir"
fi
#=================================================
# REMOVE DEPENDENCIES
#=================================================
@ -82,8 +93,6 @@ fi
#=================================================
ynh_script_progression --message="Removing various files..."
ynh_secure_remove --file="$home_path"
# Remove the log files
ynh_secure_remove --file="/var/log/$app"

View file

@ -28,9 +28,17 @@ ynh_script_progression --message="Loading installation settings..."
app=$YNH_APP_INSTANCE_NAME
final_path=$(ynh_app_setting_get --app=$app --key=final_path)
home_path=$(ynh_app_setting_get --app=$app --key=home_path)
datadir=$(ynh_app_setting_get --app=$app --key=datadir)
port=$(ynh_app_setting_get --app=$app --key=port)
#=================================================
# CHECK IF THE APP CAN BE RESTORED
#=================================================
ynh_script_progression --message="Validating restoration parameters..."
test ! -d $final_path \
|| ynh_die --message="There is already a directory: $final_path "
#=================================================
# STANDARD RESTORATION STEPS
#=================================================
@ -39,7 +47,7 @@ port=$(ynh_app_setting_get --app=$app --key=port)
ynh_script_progression --message="Recreating the dedicated system user..."
# Create the dedicated user (if not existing)
ynh_system_user_create --username=$app --home_dir=$home_path --use_shell
ynh_system_user_create --username=$app --home_dir="$final_path"
#=================================================
# RESTORE THE APP MAIN DIR
@ -52,6 +60,19 @@ chmod 750 "$final_path"
chmod -R o-rwx "$final_path"
chown -R $app:$app "$final_path"
#=================================================
# RESTORE THE DATA DIRECTORY
#=================================================
ynh_script_progression --message="Restoring the data directory..."
ynh_restore_file --origin_path="$datadir" --not_mandatory
mkdir -p $datadir
chmod 750 "$datadir"
chmod -R o-rwx "$datadir"
chown -R $app:$app "$datadir"
#=================================================
# SPECIFIC RESTORATION
#=================================================
@ -67,16 +88,9 @@ ynh_install_app_dependencies $pkg_dependencies
#=================================================
ynh_script_progression --message="Restoring various files..."
# Restore home_path
ynh_restore_file --origin_path="$home_path" --not_mandatory
mkdir -p "$home_path"
chmod 750 "$home_path"
chmod -R o-rwx "$home_path"
chown -R $app:$app "$home_path"
mkdir /var/log/$app -p
chown -R $app: /var/log/$app
# Open the port
ynh_script_progression --message="Configuring firewall..."
ynh_exec_warn_less yunohost firewall allow --no-upnp UDP $port
#=================================================
# RESTORE SYSTEMD
@ -91,6 +105,9 @@ systemctl enable $app.service --quiet
#=================================================
ynh_script_progression --message="Restoring the logrotate configuration..."
mkdir /var/log/$app -p
chown -R $app: /var/log/$app
ynh_restore_file --origin_path="/etc/logrotate.d/$app"
#=================================================

View file

@ -20,7 +20,7 @@ domain=$(ynh_app_setting_get --app=$app --key=domain)
port=$(ynh_app_setting_get --app=$app --key=port)
game=$(ynh_app_setting_get --app=$app --key=game)
final_path=$(ynh_app_setting_get --app=$app --key=final_path)
home_path=$(ynh_app_setting_get --app=$app --key=home_path)
datadir=$(ynh_app_setting_get --app=$app --key=datadir)
pvp=$(ynh_app_setting_get --app=$app --key=pvp)
creative=$(ynh_app_setting_get --app=$app --key=creative)
damage=$(ynh_app_setting_get --app=$app --key=damage)
@ -82,6 +82,13 @@ if [ -z "$domain" ]; then
ynh_app_setting_set --app=$app --key=domain --value=$domain
fi
# If datadir doesn't exist, create it
if [ -z $datadir ]; then
datadir=$(ynh_app_setting_get --app=$app --key=home_path)
ynh_app_setting_set --app=$app --key=datadir --value=$datadir
ynh_app_setting_delete --app=$app --key=home_path
fi
# Cleaning legacy permissions
if ynh_legacy_permissions_exists; then
ynh_legacy_permissions_delete_all
@ -95,7 +102,7 @@ fi
ynh_script_progression --message="Making sure dedicated system user exists..."
# Create a dedicated user (if not existing)
ynh_system_user_create --username=$app --home_dir=$home_path --use_shell
ynh_system_user_create --username=$app --home_dir="$final_path"
#=================================================
# DOWNLOAD, CHECK AND UNPACK SOURCE
@ -123,22 +130,12 @@ ynh_script_progression --message="Upgrading dependencies..."
ynh_install_app_dependencies $pkg_dependencies
#=================================================
# COPY CONFIG FILE
#=================================================
if [ -e $home_path ]
then
echo "Nothing to do..."
else
mkdir -p $home_path/.minetest/
mkdir $home_path/.minetest/worlds/
fi
#=================================================
# SPECIFIC UPGRADE
#=================================================
# Compile Minetest
# BUILDING
#=================================================
ynh_script_progression --message="Building Minetest..."
# Install the game
if [ $game = "capturetheflag" ]; then
@ -161,6 +158,18 @@ pushd $final_path
ynh_exec_warn_less make -j$(nproc)
popd
#=================================================
# COPY CONFIG FILE
#=================================================
if [ -e $datadir ]
then
echo "Nothing to do..."
else
mkdir -p $datadir/.minetest/
mkdir $datadir/.minetest/worlds/
fi
#=================================================
# UPDATE A CONFIG FILE
#=================================================
@ -173,7 +182,10 @@ else
announce="false"
fi
ynh_add_config --template="../conf/minetest.conf" --destination="$home_path/.minetest/minetest.conf"
ynh_add_config --template="../conf/minetest.conf" --destination="$datadir/.minetest/minetest.conf"
chmod 400 "$datadir/.minetest/minetest.conf"
chown $app:$app "$datadir/.minetest/minetest.conf"
#=================================================
# SETUP SYSTEMD