Security:Close the port for peertube
This commit is contained in:
parent
35d4924498
commit
90c1c007b8
|
@ -69,9 +69,6 @@ ynh_app_setting_set "$app" is_public "$is_public"
|
||||||
|
|
||||||
# Find a free port
|
# Find a free port
|
||||||
port=$(ynh_find_port 9000)
|
port=$(ynh_find_port 9000)
|
||||||
|
|
||||||
# Open this port
|
|
||||||
yunohost firewall allow Both "$port" 2>&1
|
|
||||||
ynh_app_setting_set "$app" port "$port"
|
ynh_app_setting_set "$app" port "$port"
|
||||||
|
|
||||||
#=================================================
|
#=================================================
|
||||||
|
|
|
@ -62,9 +62,6 @@ ynh_restore_file "/etc/nginx/conf.d/$domain.d/$app.conf"
|
||||||
|
|
||||||
ynh_restore_file "$final_path"
|
ynh_restore_file "$final_path"
|
||||||
|
|
||||||
# Open this port
|
|
||||||
yunohost firewall allow Both "$port" 2>&1
|
|
||||||
|
|
||||||
#=================================================
|
#=================================================
|
||||||
# RECREATE THE DEDICATED USER
|
# RECREATE THE DEDICATED USER
|
||||||
#=================================================
|
#=================================================
|
||||||
|
|
|
@ -77,8 +77,15 @@ datadir="/home/yunohost.app/${app}/storage"
|
||||||
# Create app folders
|
# Create app folders
|
||||||
mkdir -p "$datadir"
|
mkdir -p "$datadir"
|
||||||
|
|
||||||
# Open this port
|
#=================================================
|
||||||
yunohost firewall allow Both "$port" 2>&1
|
# CLOSE A PORT
|
||||||
|
#=================================================
|
||||||
|
|
||||||
|
if yunohost firewall list | grep -q "\- $port$"
|
||||||
|
then
|
||||||
|
echo "Close port $port"
|
||||||
|
yunohost firewall disallow Both "$port" 2>&1
|
||||||
|
fi
|
||||||
|
|
||||||
#=================================================
|
#=================================================
|
||||||
# CREATE DEDICATED USER
|
# CREATE DEDICATED USER
|
||||||
|
|
Loading…
Reference in a new issue