mirror of
https://github.com/YunoHost-Apps/jellyfin_ynh.git
synced 2024-09-03 19:26:29 +02:00
Refactor: Bashisms
This commit is contained in:
parent
f596efe4a9
commit
4d013faeb4
3 changed files with 4 additions and 16 deletions
|
@ -150,7 +150,7 @@ ynh_script_progression --message="Configuring system user..." --weight=2
|
||||||
# Create a system user
|
# Create a system user
|
||||||
ynh_system_user_create --username=$app
|
ynh_system_user_create --username=$app
|
||||||
|
|
||||||
if [ $(grep -q "^render:" /etc/group) ]; then
|
if grep -q "^render:" /etc/group; then
|
||||||
# Add user to render group
|
# Add user to render group
|
||||||
adduser $app render
|
adduser $app render
|
||||||
fi
|
fi
|
||||||
|
@ -218,11 +218,7 @@ needed_ports=()
|
||||||
(( $discovery_client == 1 )) && needed_ports+=( "$discovery_client_port" )
|
(( $discovery_client == 1 )) && needed_ports+=( "$discovery_client_port" )
|
||||||
|
|
||||||
# Integrate service and require to expose the ports if needed
|
# Integrate service and require to expose the ports if needed
|
||||||
if [[ -z ${needed_ports[@]} ]]; then
|
yunohost service add $app --description="Jellyfin media center" ${needed_ports:+--needs_exposed_ports} "${needed_ports[@]}"
|
||||||
yunohost service add $app --description="Jellyfin media center"
|
|
||||||
else
|
|
||||||
yunohost service add $app --description="Jellyfin media center" --needs_exposed_ports ${needed_ports[@]}
|
|
||||||
fi
|
|
||||||
|
|
||||||
#=================================================
|
#=================================================
|
||||||
# START SYSTEMD SERVICE
|
# START SYSTEMD SERVICE
|
||||||
|
|
|
@ -162,11 +162,7 @@ needed_ports=()
|
||||||
(( $discovery_client == 1 )) && needed_ports+=( "$discovery_client_port" )
|
(( $discovery_client == 1 )) && needed_ports+=( "$discovery_client_port" )
|
||||||
|
|
||||||
# Integrate service and require to expose the ports if needed
|
# Integrate service and require to expose the ports if needed
|
||||||
if [[ -z ${needed_ports[@]} ]]; then
|
yunohost service add $app --description="Jellyfin media center" ${needed_ports:+--needs_exposed_ports} "${needed_ports[@]}"
|
||||||
yunohost service add $app --description="Jellyfin media center"
|
|
||||||
else
|
|
||||||
yunohost service add $app --description="Jellyfin media center" --needs_exposed_ports ${needed_ports[@]}
|
|
||||||
fi
|
|
||||||
|
|
||||||
#=================================================
|
#=================================================
|
||||||
# RESTORE THE LOGROTATE CONFIGURATION
|
# RESTORE THE LOGROTATE CONFIGURATION
|
||||||
|
|
|
@ -241,11 +241,7 @@ needed_ports=()
|
||||||
(( $discovery_client == 1 )) && needed_ports+=( "$discovery_client_port" )
|
(( $discovery_client == 1 )) && needed_ports+=( "$discovery_client_port" )
|
||||||
|
|
||||||
# Integrate service and require to expose the ports if needed
|
# Integrate service and require to expose the ports if needed
|
||||||
if [[ -z ${needed_ports[@]} ]]; then
|
yunohost service add $app --description="Jellyfin media center" ${needed_ports:+--needs_exposed_ports} "${needed_ports[@]}"
|
||||||
yunohost service add $app --description="Jellyfin media center"
|
|
||||||
else
|
|
||||||
yunohost service add $app --description="Jellyfin media center" --needs_exposed_ports ${needed_ports[@]}
|
|
||||||
fi
|
|
||||||
|
|
||||||
#=================================================
|
#=================================================
|
||||||
# START SYSTEMD SERVICE
|
# START SYSTEMD SERVICE
|
||||||
|
|
Loading…
Add table
Reference in a new issue