1
0
Fork 0
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:
Salamandar 2022-02-20 10:30:14 +01:00 committed by Salamandar
parent f596efe4a9
commit 4d013faeb4
3 changed files with 4 additions and 16 deletions

View file

@ -150,7 +150,7 @@ ynh_script_progression --message="Configuring system user..." --weight=2
# Create a system user
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
adduser $app render
fi
@ -218,11 +218,7 @@ needed_ports=()
(( $discovery_client == 1 )) && needed_ports+=( "$discovery_client_port" )
# Integrate service and require to expose the ports if needed
if [[ -z ${needed_ports[@]} ]]; then
yunohost service add $app --description="Jellyfin media center"
else
yunohost service add $app --description="Jellyfin media center" --needs_exposed_ports ${needed_ports[@]}
fi
yunohost service add $app --description="Jellyfin media center" ${needed_ports:+--needs_exposed_ports} "${needed_ports[@]}"
#=================================================
# START SYSTEMD SERVICE

View file

@ -162,11 +162,7 @@ needed_ports=()
(( $discovery_client == 1 )) && needed_ports+=( "$discovery_client_port" )
# Integrate service and require to expose the ports if needed
if [[ -z ${needed_ports[@]} ]]; then
yunohost service add $app --description="Jellyfin media center"
else
yunohost service add $app --description="Jellyfin media center" --needs_exposed_ports ${needed_ports[@]}
fi
yunohost service add $app --description="Jellyfin media center" ${needed_ports:+--needs_exposed_ports} "${needed_ports[@]}"
#=================================================
# RESTORE THE LOGROTATE CONFIGURATION

View file

@ -241,11 +241,7 @@ needed_ports=()
(( $discovery_client == 1 )) && needed_ports+=( "$discovery_client_port" )
# Integrate service and require to expose the ports if needed
if [[ -z ${needed_ports[@]} ]]; then
yunohost service add $app --description="Jellyfin media center"
else
yunohost service add $app --description="Jellyfin media center" --needs_exposed_ports ${needed_ports[@]}
fi
yunohost service add $app --description="Jellyfin media center" ${needed_ports:+--needs_exposed_ports} "${needed_ports[@]}"
#=================================================
# START SYSTEMD SERVICE