diff --git a/manifest.toml b/manifest.toml index 1f67ca9..2f8224f 100644 --- a/manifest.toml +++ b/manifest.toml @@ -18,7 +18,7 @@ code = "https://github.com/minetest/minetest" fund = "https://www.minetest.net/get-involved/#donate" [integration] -yunohost = ">= 11.2.18" +yunohost = ">= 11.2.29" helpers_version = "2.1" architectures = "all" multi_instance = true diff --git a/scripts/install b/scripts/install index a8311a9..7764287 100755 --- a/scripts/install +++ b/scripts/install @@ -10,8 +10,6 @@ ynh_script_progression "Setting up source files..." ynh_setup_source --dest_dir="$install_dir" -#REMOVEME? Assuming the install dir is setup using ynh_setup_source, the proper chmod/chowns are now already applied and it shouldn't be necessary to tweak perms | chmod -R o-rwx "$install_dir" -#REMOVEME? Assuming the install dir is setup using ynh_setup_source, the proper chmod/chowns are now already applied and it shouldn't be necessary to tweak perms | chown -R $app:$app "$install_dir" #================================================= # BUILDING #================================================= @@ -19,12 +17,10 @@ ynh_script_progression "Building Minetest..." ynh_setup_source --dest_dir=$install_dir/games/$game --source_id=$game -# Install IrrlichtMt ynh_setup_source --dest_dir=$install_dir/lib/irrlichtmt --source_id=irrlichtmt pushd $install_dir ynh_hide_warnings cmake . -DRUN_IN_PLACE=TRUE -DENABLE_LUAJIT=TRUE -DBUILD_CLIENT=FALSE -DBUILD_SERVER=TRUE - ynh_hide_warnings make -j$(nproc) popd @@ -35,21 +31,15 @@ ynh_script_progression "Adding $app's configuration..." ynh_config_add --template="minetest.conf" --destination="$data_dir/.minetest/minetest.conf" -#REMOVEME? Assuming the file is setup using ynh_config_add, the proper chmod/chowns are now already applied and it shouldn't be necessary to tweak perms | chmod 400 "$data_dir/.minetest/minetest.conf" -#REMOVEME? Assuming the file is setup using ynh_config_add, the proper chmod/chowns are now already applied and it shouldn't be necessary to tweak perms | chown $app:$app "$data_dir/.minetest/minetest.conf" - #================================================= # SETUP SYSTEMD #================================================= ynh_script_progression "Configuring $app's systemd service..." -# Create a dedicated systemd config ynh_config_add_systemd mkdir -p /var/log/$app -#REMOVEME? Assuming ynh_config_add_logrotate is called, the proper chmod/chowns are now already applied and it shouldn't be necessary to tweak perms | chown -R $app:$app /var/log/$app -# Use logrotate to manage application logfile(s) ynh_config_add_logrotate yunohost service add $app --description="Voxel game engine and game" --log="/var/log/$app/$app.log" --needs_exposed_ports="$port" diff --git a/scripts/remove b/scripts/remove index daf7edb..df86b65 100755 --- a/scripts/remove +++ b/scripts/remove @@ -8,17 +8,14 @@ source /usr/share/yunohost/helpers #================================================= ynh_script_progression "Removing system configurations related to $app..." -# Remove the service from the list of services known by YunoHost (added from `yunohost service add`) if ynh_hide_warnings yunohost service status $app >/dev/null then ynh_script_progression "Removing $app service integration..." yunohost service remove $app fi -# Remove the dedicated systemd config ynh_config_remove_systemd -# Remove the app-specific logrotate config ynh_config_remove_logrotate #================================================= diff --git a/scripts/restore b/scripts/restore index 8f95cbd..e4cece3 100755 --- a/scripts/restore +++ b/scripts/restore @@ -1,6 +1,5 @@ #!/bin/bash -# Keep this path for calling _common.sh inside the execution's context of backup and restore scripts source ../settings/scripts/_common.sh source /usr/share/yunohost/helpers @@ -11,8 +10,6 @@ ynh_script_progression "Restoring the app main directory..." ynh_restore "$install_dir" -#REMOVEME? Assuming the install dir is setup using ynh_setup_source, the proper chmod/chowns are now already applied and it shouldn't be necessary to tweak perms | chmod -R o-rwx "$install_dir" -#REMOVEME? Assuming the install dir is setup using ynh_setup_source, the proper chmod/chowns are now already applied and it shouldn't be necessary to tweak perms | chown -R $app:$app "$install_dir" #================================================= # RESTORE THE DATA DIRECTORY #================================================= @@ -31,7 +28,6 @@ ynh_restore "/etc/systemd/system/$app.service" systemctl enable $app.service --quiet mkdir /var/log/$app -p -#REMOVEME? Assuming ynh_config_add_logrotate is called, the proper chmod/chowns are now already applied and it shouldn't be necessary to tweak perms | chown -R $app: /var/log/$app ynh_restore "/etc/logrotate.d/$app" diff --git a/scripts/upgrade b/scripts/upgrade index 623f8c8..d376d46 100755 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -15,7 +15,6 @@ ynh_systemctl --service=$app --action="stop" #================================================= ynh_script_progression "Ensuring downward compatibility..." -# If game doesn't exist, create it if [ -z $game ]; then game="minetest_game" ynh_app_setting_set --key=game --value=$game @@ -26,20 +25,15 @@ fi #================================================= ynh_script_progression "Upgrading source files..." -# Download, check integrity, uncompress and patch the source from app.src ynh_setup_source --dest_dir="$install_dir" --full_replace -#REMOVEME? Assuming the install dir is setup using ynh_setup_source, the proper chmod/chowns are now already applied and it shouldn't be necessary to tweak perms | chmod -R o-rwx "$install_dir" -#REMOVEME? Assuming the install dir is setup using ynh_setup_source, the proper chmod/chowns are now already applied and it shouldn't be necessary to tweak perms | chown -R $app:$app "$install_dir" #================================================= # BUILDING #================================================= ynh_script_progression "Building Minetest..." -# Install the game ynh_setup_source --dest_dir=$install_dir/games/$game --source_id=$game -# Install IrrlichtMt ynh_setup_source --dest_dir=$install_dir/lib/irrlichtmt --source_id=irrlichtmt pushd $install_dir @@ -67,18 +61,13 @@ ynh_script_progression "Updating configuration..." ynh_config_add --template="minetest.conf" --destination="$data_dir/.minetest/minetest.conf" -#REMOVEME? Assuming the file is setup using ynh_config_add, the proper chmod/chowns are now already applied and it shouldn't be necessary to tweak perms | chmod 400 "$data_dir/.minetest/minetest.conf" -#REMOVEME? Assuming the file is setup using ynh_config_add, the proper chmod/chowns are now already applied and it shouldn't be necessary to tweak perms | chown $app:$app "$data_dir/.minetest/minetest.conf" - #================================================= # SETUP SYSTEMD #================================================= ynh_script_progression "Upgrading systemd configuration..." -# Create a dedicated systemd config ynh_config_add_systemd -# Use logrotate to manage app-specific logfile(s) ynh_config_add_logrotate yunohost service add $app --description="Voxel game engine and game" --log="/var/log/$app/$app.log" --needs_exposed_ports="$port"