mirror of
https://github.com/YunoHost-Apps/nomad_ynh.git
synced 2024-09-03 19:55:53 +02:00
Fix systemctl start
This commit is contained in:
parent
711d189463
commit
4ecc09abfc
3 changed files with 14 additions and 20 deletions
|
@ -193,10 +193,7 @@ then
|
|||
ynh_add_config --template="../conf/default.conf" --destination="/etc/lxc/default.conf"
|
||||
ynh_add_config --template="../conf/lxc-net" --destination="/etc/default/lxc-net"
|
||||
systemctl enable lxc-net --quiet
|
||||
systemctl start lxc-net --quiet
|
||||
#iptables -A FORWARD -i $lxc_bridge -o $main_iface -j ACCEPT
|
||||
#iptables -A FORWARD -i $main_iface -o $lxc_bridge -j ACCEPT
|
||||
#iptables -t nat -A POSTROUTING -s $plage_ip.0/24 -j MASQUERADE
|
||||
ynh_systemd_action --service_name=lxc-net --action="restart" --line_match="Started LXC network bridge" --log_path="systemd"
|
||||
fi
|
||||
|
||||
#=================================================
|
||||
|
|
|
@ -53,17 +53,6 @@ ynh_script_progression --message="Removing logrotate configuration..."
|
|||
# Remove the app-specific logrotate config
|
||||
ynh_remove_logrotate
|
||||
|
||||
#=================================================
|
||||
# REMOVE DATA DIR
|
||||
#=================================================
|
||||
|
||||
# Remove the data directory if --purge option is used
|
||||
if [ "${YNH_APP_PURGE:-0}" -eq 1 ]
|
||||
then
|
||||
ynh_script_progression --message="Removing app data directory..."
|
||||
ynh_secure_remove --file="$datadir"
|
||||
fi
|
||||
|
||||
#=================================================
|
||||
# REMOVE NGINX CONFIGURATION
|
||||
#=================================================
|
||||
|
@ -93,7 +82,7 @@ then
|
|||
|
||||
lxc_bridge=$(ynh_app_setting_get --app=$app --key=lxc_bridge)
|
||||
|
||||
systemctl stop lxc-net --quiet
|
||||
ynh_systemd_action --service_name=lxc-net --action="stop"
|
||||
systemctl disable lxc-net --quiet
|
||||
ynh_secure_remove --file="/etc/default/lxc-net"
|
||||
ynh_secure_remove --file="/etc/lxc/default.conf"
|
||||
|
@ -109,6 +98,17 @@ ynh_script_progression --message="Removing dependencies..."
|
|||
# Remove metapackage and its dependencies
|
||||
ynh_remove_app_dependencies
|
||||
|
||||
#=================================================
|
||||
# REMOVE DATA DIR
|
||||
#=================================================
|
||||
|
||||
# Remove the data directory if --purge option is used
|
||||
if [ "${YNH_APP_PURGE:-0}" -eq 1 ]
|
||||
then
|
||||
ynh_script_progression --message="Removing app data directory..."
|
||||
ynh_secure_remove --file="$datadir"
|
||||
fi
|
||||
|
||||
#=================================================
|
||||
# SPECIFIC REMOVE
|
||||
#=================================================
|
||||
|
|
|
@ -119,10 +119,7 @@ then
|
|||
ynh_add_config --template="../conf/lxc-net" --destination="/etc/default/lxc-net"
|
||||
ynh_add_config --template="../conf/default.conf" --destination="/etc/lxc/default.conf"
|
||||
systemctl enable lxc-net --quiet
|
||||
systemctl start lxc-net --quiet
|
||||
#iptables -A FORWARD -i $lxc_bridge -o $main_iface -j ACCEPT
|
||||
#iptables -A FORWARD -i $main_iface -o $lxc_bridge -j ACCEPT
|
||||
#iptables -t nat -A POSTROUTING -s $plage_ip.0/24 -j MASQUERADE
|
||||
ynh_systemd_action --service_name=lxc-net --action="restart" --line_match="Started LXC network bridge" --log_path="systemd"
|
||||
fi
|
||||
|
||||
#=================================================
|
||||
|
|
Loading…
Add table
Reference in a new issue