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:
parent
6646cfcdaf
commit
b2e16316c0
1 changed files with 8 additions and 5 deletions
|
@ -13,26 +13,29 @@ welcometext=$3
|
||||||
port=$4
|
port=$4
|
||||||
registerName=$5
|
registerName=$5
|
||||||
|
|
||||||
mumble_conf=/etc/mumble-server.ini
|
# Source YunoHost helpers
|
||||||
|
source /usr/share/yunohost/helpers
|
||||||
|
|
||||||
# Check port availability
|
# Check port availability
|
||||||
sudo yunohost app checkport $port
|
sudo yunohost app checkport $port
|
||||||
if [[ ! $? -eq 0 ]]; then
|
if [[ ! $? -eq 0 ]]; then
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
#check if su_password is not empty
|
# Check if su_password is not empty
|
||||||
if [[ -z "$su_passwd" ]]; then
|
if [[ -z "$su_passwd" ]]; then
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# Save app settings
|
# Save app settings
|
||||||
sudo yunohost app setting $app port -v "$port"
|
ynh_app_setting_set $app port "$port"
|
||||||
|
|
||||||
# install via apt-get
|
# install via apt-get
|
||||||
sudo apt-get update > /dev/null 2>&1
|
sudo apt-get update > /dev/null 2>&1
|
||||||
sudo apt-get install -y mumble-server > /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 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
|
||||||
|
|
Loading…
Add table
Reference in a new issue