mirror of
https://github.com/YunoHost-Apps/mumbleserver_ynh.git
synced 2024-09-03 19:46:03 +02:00
clean up
This commit is contained in:
parent
6ab9c0a2ec
commit
edbfa2b313
4 changed files with 34 additions and 21 deletions
|
@ -1,4 +1,4 @@
|
||||||
# Mumble server package for YunoHost
|
# Mumble server for YunoHost
|
||||||
|
|
||||||
[](https://dash.yunohost.org/appci/app/mumbleserver)
|
[](https://dash.yunohost.org/appci/app/mumbleserver)
|
||||||
[](https://install-app.yunohost.org/?app=mumbleserver)
|
[](https://install-app.yunohost.org/?app=mumbleserver)
|
||||||
|
|
|
@ -4,8 +4,8 @@ Requires=network-online.target
|
||||||
After=network.target
|
After=network.target
|
||||||
|
|
||||||
[Service]
|
[Service]
|
||||||
User=mumble-server
|
User=__APP__
|
||||||
Group=mumble-server
|
Group=__APP__
|
||||||
Type=forking
|
Type=forking
|
||||||
# https://www.freedesktop.org/software/systemd/man/systemd.exec.html#RuntimeDirectory=
|
# https://www.freedesktop.org/software/systemd/man/systemd.exec.html#RuntimeDirectory=
|
||||||
RuntimeDirectory=mumble-server
|
RuntimeDirectory=mumble-server
|
||||||
|
|
|
@ -6,12 +6,7 @@
|
||||||
# IMPORT GENERIC HELPERS
|
# IMPORT GENERIC HELPERS
|
||||||
#=================================================
|
#=================================================
|
||||||
|
|
||||||
if [ ! -e _common.sh ]; then
|
source ../settings/scripts/_common.sh
|
||||||
# Get the _common.sh file if it's not in the current directory
|
|
||||||
cp ../settings/scripts/_common.sh ./_common.sh
|
|
||||||
chmod a+rx _common.sh
|
|
||||||
fi
|
|
||||||
source _common.sh
|
|
||||||
source /usr/share/yunohost/helpers
|
source /usr/share/yunohost/helpers
|
||||||
|
|
||||||
#=================================================
|
#=================================================
|
||||||
|
@ -21,14 +16,19 @@ source /usr/share/yunohost/helpers
|
||||||
# Exit if an error occurs during the execution of the script
|
# Exit if an error occurs during the execution of the script
|
||||||
ynh_abort_if_errors
|
ynh_abort_if_errors
|
||||||
|
|
||||||
|
|
||||||
#=================================================
|
#=================================================
|
||||||
# LOAD SETTINGS
|
# LOAD SETTINGS
|
||||||
#=================================================
|
#=================================================
|
||||||
|
ynh_print_info --message="Loading installation settings..."
|
||||||
|
|
||||||
app=$YNH_APP_INSTANCE_NAME
|
app=$YNH_APP_INSTANCE_NAME
|
||||||
|
|
||||||
final_path=$(ynh_app_setting_get $app final_path)
|
final_path=$(ynh_app_setting_get --app=$app --key=final_path)
|
||||||
|
|
||||||
|
#=================================================
|
||||||
|
# DECLARE DATA AND CONF FILES TO BACKUP
|
||||||
|
#=================================================
|
||||||
|
ynh_print_info --message="Declaring files to be backed up..."
|
||||||
|
|
||||||
#=================================================
|
#=================================================
|
||||||
# STANDARD BACKUP STEPS
|
# STANDARD BACKUP STEPS
|
||||||
|
@ -43,3 +43,9 @@ ynh_backup "$final_path"
|
||||||
#=================================================
|
#=================================================
|
||||||
|
|
||||||
ynh_backup "/etc/systemd/system/$app.service"
|
ynh_backup "/etc/systemd/system/$app.service"
|
||||||
|
|
||||||
|
#=================================================
|
||||||
|
# END OF SCRIPT
|
||||||
|
#=================================================
|
||||||
|
|
||||||
|
ynh_print_info --message="Backup script completed for $app. (YunoHost will then actually copy those files to the archive)."
|
||||||
|
|
|
@ -44,13 +44,13 @@ test ! -e "$final_path" || ynh_die "This path already contains a folder"
|
||||||
#=================================================
|
#=================================================
|
||||||
|
|
||||||
# Save app settings
|
# Save app settings
|
||||||
ynh_app_setting_set "$app" domain "$domain"
|
ynh_app_setting_set --app=$app --key=domain --value="$domain"
|
||||||
ynh_app_setting_set "$app" no_sso "true"
|
ynh_app_setting_set --app=$app --key=no_sso --value="true"
|
||||||
ynh_app_setting_set "$app" server_password "$server_password"
|
ynh_app_setting_set --app=$app --key=server_password --value="$server_password"
|
||||||
ynh_app_setting_set "$app" su_passwd "$su_passwd"
|
ynh_app_setting_set --app=$app --key=su_passwd --value="$su_passwd"
|
||||||
ynh_app_setting_set "$app" welcometext "$welcometext"
|
ynh_app_setting_set --app=$app --key=welcometext --value="$welcometext"
|
||||||
ynh_app_setting_set "$app" registerName "$registerName"
|
ynh_app_setting_set --app=$app --key=registerName --value="$registerName"
|
||||||
ynh_app_setting_set "$app" instance_id "$instance_id"
|
ynh_app_setting_set --app=$app --key=instance_id --value="$instance_id"
|
||||||
|
|
||||||
#=================================================
|
#=================================================
|
||||||
# STANDARD MODIFICATIONS
|
# STANDARD MODIFICATIONS
|
||||||
|
@ -79,7 +79,7 @@ ynh_install_app_dependencies $pkg_dependencies
|
||||||
#=================================================
|
#=================================================
|
||||||
|
|
||||||
mkdir -p "$final_path"
|
mkdir -p "$final_path"
|
||||||
ynh_app_setting_set "$app" final_path "$final_path"
|
ynh_app_setting_set --app=$app --key=final_path --value=$final_path
|
||||||
|
|
||||||
# Configuring with given settings
|
# Configuring with given settings
|
||||||
mumble_conf="$final_path/mumble-server.ini"
|
mumble_conf="$final_path/mumble-server.ini"
|
||||||
|
@ -134,11 +134,12 @@ systemctl stop $app
|
||||||
systemctl disable $app
|
systemctl disable $app
|
||||||
|
|
||||||
#=================================================
|
#=================================================
|
||||||
# ADVERTISE SERVICE IN ADMIN PANEL
|
# INTEGRATE SERVICE IN YUNOHOST
|
||||||
#=================================================
|
#=================================================
|
||||||
|
ynh_script_progression --message="Integrating service in YunoHost..."
|
||||||
|
|
||||||
# Add Mumble as a YunoHost service
|
# Add Mumble as a YunoHost service
|
||||||
yunohost service add "$app" -l "/var/log/mumble-server/$app.log"
|
yunohost service add $app --description "Mumble server" --log="/var/log/$app/$app.log"
|
||||||
|
|
||||||
systemctl restart "$app"
|
systemctl restart "$app"
|
||||||
|
|
||||||
|
@ -162,3 +163,9 @@ Are you facing an issue, want to improve this app or say thank you?
|
||||||
Please open a new issue in this project: https://github.com/YunoHost-Apps/mumbleserver_ynh
|
Please open a new issue in this project: https://github.com/YunoHost-Apps/mumbleserver_ynh
|
||||||
"
|
"
|
||||||
ynh_send_readme_to_admin "$message"
|
ynh_send_readme_to_admin "$message"
|
||||||
|
|
||||||
|
#=================================================
|
||||||
|
# END OF SCRIPT
|
||||||
|
#=================================================
|
||||||
|
|
||||||
|
ynh_script_progression --message="Installation of $app completed" --last
|
||||||
|
|
Loading…
Add table
Reference in a new issue