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: retrive helpers, use setting helper, move conf file definition.

This commit is contained in:
Moul 2017-05-23 11:15:40 +02:00
parent 6646cfcdaf
commit b2e16316c0

View file

@ -13,26 +13,29 @@ welcometext=$3
port=$4
registerName=$5
mumble_conf=/etc/mumble-server.ini
# Source YunoHost helpers
source /usr/share/yunohost/helpers
# Check port availability
sudo yunohost app checkport $port
if [[ ! $? -eq 0 ]]; then
exit 1
fi
#check if su_password is not empty
# Check if su_password is not empty
if [[ -z "$su_passwd" ]]; then
exit 1
fi
# Save app settings
sudo yunohost app setting $app port -v "$port"
ynh_app_setting_set $app port "$port"
# install via apt-get
sudo apt-get update > /dev/null 2>&1
sudo apt-get install -y mumble-server > /dev/null 2>&1
#copying conf file
# Copying conf file
mumble_conf="/etc/mumble-server.ini"
sudo cp ../conf/mumble-server.ini $mumble_conf
sudo chmod 660 $mumble_conf
sudo chown :mumble-server $mumble_conf