mirror of
https://github.com/YunoHost-Apps/minidlna_ynh.git
synced 2024-09-03 19:36:34 +02:00
Merge 1602d1008f
into a545945194
This commit is contained in:
commit
99b363ac3c
5 changed files with 4 additions and 17 deletions
|
@ -4,23 +4,10 @@
|
|||
# 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
|
||||
#=================================================
|
||||
|
||||
|
||||
#=================================================
|
||||
# EXPERIMENTAL HELPERS
|
||||
#=================================================
|
||||
|
|
|
@ -44,7 +44,7 @@ ynh_script_progression --message="Increasing inotify's limits..." --weight=1
|
|||
# Increase the maximum number of files inotify can monitor.
|
||||
cp -a ../conf/90-inotify_minidlna.conf /etc/sysctl.d/
|
||||
# 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
|
||||
fi
|
||||
|
||||
|
|
|
@ -37,7 +37,7 @@ ynh_script_progression --message="Removing various files..." --weight=1
|
|||
if [ -e "/etc/sysctl.d/90-inotify_minidlna.conf" ]; then
|
||||
ynh_secure_remove --file="/etc/sysctl.d/90-inotify_minidlna.conf"
|
||||
# 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
|
||||
sysctl --system
|
||||
fi
|
||||
|
|
|
@ -33,7 +33,7 @@ ynh_multimedia_build_main_dir
|
|||
ynh_script_progression --message="Restoring various files..." --weight=1
|
||||
|
||||
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
|
||||
fi
|
||||
# Delete the current config of minidlna, in order to replace it by the version from the backup
|
||||
|
|
|
@ -61,7 +61,7 @@ ynh_script_progression --message="Increasing inotify's limits..." --weight=2
|
|||
# Increase the maximum number of files inotify can monitor.
|
||||
cp -a ../conf/90-inotify_minidlna.conf /etc/sysctl.d/
|
||||
# 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
|
||||
sysctl -p /etc/sysctl.d/90-inotify_minidlna.conf
|
||||
fi
|
||||
|
|
Loading…
Add table
Reference in a new issue