1
0
Fork 0
mirror of https://github.com/YunoHost-Apps/minidlna_ynh.git synced 2024-09-03 19:36:34 +02:00
This commit is contained in:
Augustin Trancart 2024-02-14 09:00:46 +01:00 committed by GitHub
commit 99b363ac3c
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
5 changed files with 4 additions and 17 deletions

View file

@ -4,23 +4,10 @@
# COMMON VARIABLES # COMMON VARIABLES
#================================================= #=================================================
#=================================================
# PACKAGE CHECK BYPASSING...
#=================================================
IS_PACKAGE_CHECK() {
if [ "${PACKAGE_CHECK_EXEC:-0}" -eq 1 ]; then
return 0
else
return 1
fi
}
#================================================= #=================================================
# FUTUR OFFICIAL HELPERS # FUTUR OFFICIAL HELPERS
#================================================= #=================================================
#================================================= #=================================================
# EXPERIMENTAL HELPERS # EXPERIMENTAL HELPERS
#================================================= #=================================================

View file

@ -44,7 +44,7 @@ ynh_script_progression --message="Increasing inotify's limits..." --weight=1
# Increase the maximum number of files inotify can monitor. # Increase the maximum number of files inotify can monitor.
cp -a ../conf/90-inotify_minidlna.conf /etc/sysctl.d/ cp -a ../conf/90-inotify_minidlna.conf /etc/sysctl.d/
# Then, reload the kernel configuration. # Then, reload the kernel configuration.
if ! IS_PACKAGE_CHECK; then # LXC doesn't allow sysctl to play with kernel options. if ! [ "$container" = "lxc" ]; then # LXC doesn't allow sysctl to play with kernel options.
sysctl -p /etc/sysctl.d/90-inotify_minidlna.conf sysctl -p /etc/sysctl.d/90-inotify_minidlna.conf
fi fi

View file

@ -37,7 +37,7 @@ ynh_script_progression --message="Removing various files..." --weight=1
if [ -e "/etc/sysctl.d/90-inotify_minidlna.conf" ]; then if [ -e "/etc/sysctl.d/90-inotify_minidlna.conf" ]; then
ynh_secure_remove --file="/etc/sysctl.d/90-inotify_minidlna.conf" ynh_secure_remove --file="/etc/sysctl.d/90-inotify_minidlna.conf"
# Reload the kernel configuration. # Reload the kernel configuration.
if ! IS_PACKAGE_CHECK # LXC doesn't allow sysctl to play with kernel options. if ! [ "$container" = "lxc" ] # LXC doesn't allow sysctl to play with kernel options.
then then
sysctl --system sysctl --system
fi fi

View file

@ -33,7 +33,7 @@ ynh_multimedia_build_main_dir
ynh_script_progression --message="Restoring various files..." --weight=1 ynh_script_progression --message="Restoring various files..." --weight=1
ynh_restore_file --origin_path="/etc/sysctl.d/90-inotify_minidlna.conf" ynh_restore_file --origin_path="/etc/sysctl.d/90-inotify_minidlna.conf"
if ! IS_PACKAGE_CHECK; then # LXC doesn't allow sysctl to play with kernel options. if ! [ "$container" = "lxc" ]; then # LXC doesn't allow sysctl to play with kernel options.
sysctl -p /etc/sysctl.d/90-inotify_minidlna.conf sysctl -p /etc/sysctl.d/90-inotify_minidlna.conf
fi fi
# Delete the current config of minidlna, in order to replace it by the version from the backup # Delete the current config of minidlna, in order to replace it by the version from the backup

View file

@ -61,7 +61,7 @@ ynh_script_progression --message="Increasing inotify's limits..." --weight=2
# Increase the maximum number of files inotify can monitor. # Increase the maximum number of files inotify can monitor.
cp -a ../conf/90-inotify_minidlna.conf /etc/sysctl.d/ cp -a ../conf/90-inotify_minidlna.conf /etc/sysctl.d/
# Then, reload the kernel configuration. # Then, reload the kernel configuration.
if ! IS_PACKAGE_CHECK # LXC doesn't allow sysctl to play with kernel options. if ! [ "$container" = "lxc" ]; # lxc doesn't allow sysctl to play with kernel options.
then then
sysctl -p /etc/sysctl.d/90-inotify_minidlna.conf sysctl -p /etc/sysctl.d/90-inotify_minidlna.conf
fi fi