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
|
||||
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
|
||||
|
@ -56,4 +59,4 @@ sudo murmurd -supw $su_passwd
|
|||
sudo /etc/init.d/mumble-server restart
|
||||
|
||||
#adding mumble as a service
|
||||
sudo yunohost service add mumble-server -l /var/log/mumble-server/mumble-server.log
|
||||
sudo yunohost service add mumble-server -l /var/log/mumble-server/mumble-server.log
|
||||
|
|
Loading…
Add table
Reference in a new issue