1
0
Fork 0
mirror of https://github.com/YunoHost-Apps/kodi_ynh.git synced 2024-09-03 19:26:34 +02:00

Modify Xwrapper file after xorg and dbus-x11 install

This commit is contained in:
SylvainCecchetto 2017-09-27 23:24:12 +02:00
parent fbe3096cc2
commit 7cd039d872
2 changed files with 9 additions and 12 deletions

View file

@ -5,21 +5,18 @@
#================================================= #=================================================
# IMPORT GENERIC HELPERS # IMPORT GENERIC HELPERS
#================================================= #=================================================
source _common.sh source _common.sh
source /usr/share/yunohost/helpers source /usr/share/yunohost/helpers
#================================================= #=================================================
# MANAGE SCRIPT FAILURE # MANAGE SCRIPT FAILURE
#================================================= #=================================================
# 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
#================================================= #=================================================
# RETRIEVE ARGUMENTS FROM THE MANIFEST # RETRIEVE ARGUMENTS FROM THE MANIFEST
#================================================= #=================================================
domain=$YNH_APP_ARG_DOMAIN domain=$YNH_APP_ARG_DOMAIN
path_url=$YNH_APP_ARG_PATH path_url=$YNH_APP_ARG_PATH
launch_on_boot=$YNH_APP_ARG_LAUNCH_ON_BOOT launch_on_boot=$YNH_APP_ARG_LAUNCH_ON_BOOT
@ -39,7 +36,6 @@ ynh_webpath_register $app $domain $path_url
#================================================= #=================================================
# STORE SETTINGS FROM MANIFEST # STORE SETTINGS FROM MANIFEST
#================================================= #=================================================
ynh_app_setting_set $app domain $domain ynh_app_setting_set $app domain $domain
ynh_app_setting_set $app final_path $final_path ynh_app_setting_set $app final_path $final_path
ynh_app_setting_set $app launch_on_boot $launch_on_boot ynh_app_setting_set $app launch_on_boot $launch_on_boot
@ -51,7 +47,6 @@ sudo mkdir /home/$app
ynh_system_user_create "$app" "/home/$app" ynh_system_user_create "$app" "/home/$app"
sudo chown -R $app:$app /home/$app sudo chown -R $app:$app /home/$app
sudo usermod -a -G cdrom,audio,video,plugdev,users,dialout,dip,input $app sudo usermod -a -G cdrom,audio,video,plugdev,users,dialout,dip,input $app
sudo sed -i 's/allowed_users=console/allowed_users=anybody/' /etc/X11/Xwrapper.config
#================================================= #=================================================
# ADD SYSTEMD SCRIPT (SERVICE) # ADD SYSTEMD SCRIPT (SERVICE)
@ -66,5 +61,11 @@ sudo cp ../conf/kodi.service /etc/systemd/system/kodi.service
#================================================= #=================================================
sudo cp ../conf/kodi.list /etc/apt/sources.list.d/${app}.list sudo cp ../conf/kodi.list /etc/apt/sources.list.d/${app}.list
ynh_package_update ynh_package_update
ynh_package_install xinit dbus-x11 kodi ynh_package_install xorg dbus-x11 kodi
#=================================================
# X11 SETTINGS
#=================================================
sudo sed -i 's/allowed_users=console/allowed_users=anybody/' /etc/X11/Xwrapper.config

View file

@ -23,9 +23,9 @@ launch_on_boot=$(ynh_app_setting_get $app launch_on_boot)
#================================================= #=================================================
# REMOVE DEPENDENCIES # REMOVE DEPENDENCIES
#================================================= #=================================================
# Remove metapackage and its dependencies # Remove metapackage and its dependencies
ynh_package_autoremove kodi xinit dbus-x11 sudo sed -i 's/allowed_users=anybody/allowed_users=console/' /etc/X11/Xwrapper.config
ynh_package_autoremove kodi xorg dbus-x11
sudo rm -f "/etc/apt/sources.list.d/${app}.list" sudo rm -f "/etc/apt/sources.list.d/${app}.list"
ynh_package_update ynh_package_update
@ -33,7 +33,6 @@ ynh_package_update
#================================================= #=================================================
# REMOVE APP MAIN DIR # REMOVE APP MAIN DIR
#================================================= #=================================================
# Remove the app directory securely # Remove the app directory securely
ynh_secure_remove "$final_path" ynh_secure_remove "$final_path"
@ -41,17 +40,14 @@ ynh_secure_remove "$final_path"
#================================================= #=================================================
# REMOVE SYSTEMD SCRIPT (SERVICE) # REMOVE SYSTEMD SCRIPT (SERVICE)
#================================================= #=================================================
ynh_remove_systemd_config ynh_remove_systemd_config
#================================================= #=================================================
# REMOVE KODI USER # REMOVE KODI USER
#================================================= #=================================================
ynh_system_user_delete "$app" ynh_system_user_delete "$app"
sudo rm -rf "/home/$app" sudo rm -rf "/home/$app"
sudo sed -i 's/allowed_users=anybody/allowed_users=console/' /etc/X11/Xwrapper.config