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
|
||||
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
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
Loading…
Add table
Reference in a new issue