1
0
Fork 0
mirror of https://github.com/YunoHost-Apps/mumbleserver_ynh.git synced 2024-09-03 19:46:03 +02:00
This commit is contained in:
matlink 2014-11-10 21:13:58 +01:00
parent ebbb60585c
commit 050cd91013

View file

@ -1,6 +1,8 @@
#!/bin/bash #!/bin/bash
exec > >(tee /tmp/mumble-install.log)
exec 2>&1 #debug commands
#exec > >(tee /tmp/mumble-install.log)
#exec 2>&1
app=mumbleserver app=mumbleserver
# Retrieve arguments # Retrieve arguments
@ -11,21 +13,14 @@ port=$4
registerName=$5 registerName=$5
mumble_conf=/etc/mumble-server.ini mumble_conf=/etc/mumble-server.ini
# Check user
sudo yunohost user list --json | grep -q "\"username\": \"$admin\""
if [[ ! $? -eq 0 ]]; then
echo "Wrong user"
exit 1
fi
# 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
# Save app settings # Save app settings
sudo yunohost app setting $app admin -v "$admin"
sudo yunohost app setting $app port -v "$port" sudo yunohost app setting $app port -v "$port"
# install via apt-get # install via apt-get