1
0
Fork 0
mirror of https://github.com/YunoHost-Apps/mumbleserver_ynh.git synced 2024-09-03 19:46:03 +02:00

[mod] install: install with 'apt', modify conf file then move it.

This commit is contained in:
Moul 2017-05-23 11:31:00 +02:00
parent ca69b2971f
commit fd570fa59f

View file

@ -31,9 +31,16 @@ fi
# Save app settings # Save app settings
ynh_app_setting_set $app port "$port" ynh_app_setting_set $app port "$port"
# install via apt-get # Install Mumble Debian package via apt
sudo apt-get update > /dev/null 2>&1 sudo apt update > /dev/null 2>&1
sudo apt-get install -y mumble-server > /dev/null 2>&1 sudo apt install -y mumble-server > /dev/null 2>&1
# Configuring with given settings
mumble_conf="../conf/mumble-server.ini"
sudo sed -i "s/welcometext=.*/welcometext=$welcometext/g" $mumble_conf
sudo sed -i "s/port=.*/port=$port/g" $mumble_conf
sudo sed -i "s/serverpassword=.*/serverpassword=$server_password/g" $mumble_conf
sudo sed -i "s/#registerName=.*/registerName=$registerName/g" $mumble_conf
# Copying conf file # Copying conf file
mumble_conf="/etc/mumble-server.ini" mumble_conf="/etc/mumble-server.ini"
@ -41,12 +48,6 @@ sudo cp ../conf/mumble-server.ini $mumble_conf
sudo chmod 660 $mumble_conf sudo chmod 660 $mumble_conf
sudo chown :mumble-server $mumble_conf sudo chown :mumble-server $mumble_conf
#configuring with given settings
sudo sed -i "s/welcometext=.*/welcometext=$welcometext/g" $mumble_conf
sudo sed -i "s/port=.*/port=$port/g" $mumble_conf
sudo sed -i "s/serverpassword=.*/serverpassword=$server_password/g" $mumble_conf
sudo sed -i "s/#registerName=.*/registerName=$registerName/g" $mumble_conf
#open port in firewall #open port in firewall
sudo yunohost firewall allow Both $port > /dev/null 2>&1 sudo yunohost firewall allow Both $port > /dev/null 2>&1
sudo yunohost firewall allow --ipv6 Both $port > /dev/null 2>&1 sudo yunohost firewall allow --ipv6 Both $port > /dev/null 2>&1