mirror of
https://github.com/YunoHost-Apps/ghost_ynh.git
synced 2024-09-03 19:16:02 +02:00
Security:Close port
This commit is contained in:
parent
75185f824f
commit
b4e7cf8ded
3 changed files with 10 additions and 5 deletions
|
@ -66,8 +66,6 @@ ynh_app_setting_set $app is_public $is_public
|
|||
|
||||
# Find a free port
|
||||
port=$(ynh_find_port 4010)
|
||||
# Open this port
|
||||
yunohost firewall allow --no-upnp TCP $port 2>&1
|
||||
ynh_app_setting_set $app port $port
|
||||
|
||||
#=================================================
|
||||
|
|
|
@ -52,9 +52,6 @@ ynh_restore_file "/etc/nginx/conf.d/$domain.d/$app.conf"
|
|||
|
||||
ynh_restore_file "$final_path"
|
||||
|
||||
# Open this port
|
||||
yunohost firewall allow Both "$port" 2>&1
|
||||
|
||||
#=================================================
|
||||
# RESTORE THE MYSQL DATABASE
|
||||
#=================================================
|
||||
|
|
|
@ -90,6 +90,16 @@ sudo rm -R "$tmpdir1/ghost.zip"
|
|||
sudo cp -ar "$tmpdir/content" "${final_path}"
|
||||
sudo rm -R "$tmpdir"
|
||||
|
||||
#=================================================
|
||||
# CLOSE A PORT
|
||||
#=================================================
|
||||
|
||||
if yunohost firewall list | grep -q "\- $port$"
|
||||
then
|
||||
echo "Close port $port"
|
||||
yunohost firewall disallow TCP $port 2>&1
|
||||
fi
|
||||
|
||||
#=================================================
|
||||
# SPECIFIC SETUP
|
||||
#=================================================
|
||||
|
|
Loading…
Add table
Reference in a new issue