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

Merge pull request #25 from YunoHost-Apps/testing

usermod to $app
This commit is contained in:
yalh76 2022-07-23 03:03:18 +02:00 committed by GitHub
commit 662cf5256b
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
6 changed files with 15 additions and 15 deletions

View file

@ -18,7 +18,7 @@ If you don't have YunoHost, please consult [the guide](https://yunohost.org/#/in
Jeedom is an home automation software. Jeedom is an home automation software.
**Shipped version:** 4.1.19~ynh2 **Shipped version:** 4.1.19~ynh3
## Screenshots ## Screenshots

View file

@ -18,7 +18,7 @@ Si vous n'avez pas YunoHost, regardez [ici](https://yunohost.org/#/install) pour
Jeedom is an home automation software. Jeedom is an home automation software.
**Version incluse :** 4.1.19~ynh2 **Version incluse :** 4.1.19~ynh3
## Captures d'écran ## Captures d'écran

View file

@ -6,7 +6,7 @@
"en": "Home automation application", "en": "Home automation application",
"fr": "Application de domotique" "fr": "Application de domotique"
}, },
"version": "4.1.19~ynh2", "version": "4.1.19~ynh3",
"url": "https://www.jeedom.com", "url": "https://www.jeedom.com",
"upstream": { "upstream": {
"license": "GPL-2.0-or-later", "license": "GPL-2.0-or-later",

View file

@ -123,18 +123,18 @@ chown $app:www-data -R /tmp/jeedom
# For nginx user to be able to communicate with home automation devices # For nginx user to be able to communicate with home automation devices
if [ $(getent group dialout) ]; then if [ $(getent group dialout) ]; then
usermod -a -G dialout www-data usermod -a -G dialout $app
fi fi
if [ $(getent group gpio) ]; then if [ $(getent group gpio) ]; then
usermod -a -G gpio www-data usermod -a -G gpio $app
fi fi
if [ $(getent group tty) ]; then if [ $(getent group tty) ]; then
usermod -a -G tty www-data usermod -a -G tty $app
fi fi
# Sudo permissions to the user if agreed to # Sudo permissions to the user if agreed to
if [ ${sudo} ]; then if [ ${sudo} ]; then
usermod -a -G "sudo" www-data usermod -a -G "sudo" $app
if [ $(grep "www-data ALL=(ALL) NOPASSWD: ALL" /etc/sudoers | wc -l) -eq 0 ];then if [ $(grep "www-data ALL=(ALL) NOPASSWD: ALL" /etc/sudoers | wc -l) -eq 0 ];then
bash -c 'echo "www-data ALL=(ALL) NOPASSWD: ALL" | (EDITOR="tee -a" visudo)' bash -c 'echo "www-data ALL=(ALL) NOPASSWD: ALL" | (EDITOR="tee -a" visudo)'
fi fi

View file

@ -101,18 +101,18 @@ chown $app:www-data -R /tmp/jeedom
# For nginx user to be able to communicate with home automation devices # For nginx user to be able to communicate with home automation devices
if [ $(getent group dialout) ]; then if [ $(getent group dialout) ]; then
usermod -a -G dialout www-data usermod -a -G dialout $app
fi fi
if [ $(getent group gpio) ]; then if [ $(getent group gpio) ]; then
usermod -a -G gpio www-data usermod -a -G gpio $app
fi fi
if [ $(getent group tty) ]; then if [ $(getent group tty) ]; then
usermod -a -G tty www-data usermod -a -G tty $app
fi fi
# Sudo permissions to the user if agreed to # Sudo permissions to the user if agreed to
if [ ${sudo} ]; then if [ ${sudo} ]; then
usermod -a -G "sudo" www-data usermod -a -G "sudo" $app
if [ $(grep "www-data ALL=(ALL) NOPASSWD: ALL" /etc/sudoers | wc -l) -eq 0 ];then if [ $(grep "www-data ALL=(ALL) NOPASSWD: ALL" /etc/sudoers | wc -l) -eq 0 ];then
bash -c 'echo "www-data ALL=(ALL) NOPASSWD: ALL" | (EDITOR="tee -a" visudo)' bash -c 'echo "www-data ALL=(ALL) NOPASSWD: ALL" | (EDITOR="tee -a" visudo)'
fi fi

View file

@ -128,18 +128,18 @@ chown $app:www-data -R /tmp/jeedom
# For nginx user to be able to communicate with home automation devices # For nginx user to be able to communicate with home automation devices
if [ $(getent group dialout) ]; then if [ $(getent group dialout) ]; then
usermod -a -G dialout www-data usermod -a -G dialout $app
fi fi
if [ $(getent group gpio) ]; then if [ $(getent group gpio) ]; then
usermod -a -G gpio www-data usermod -a -G gpio $app
fi fi
if [ $(getent group tty) ]; then if [ $(getent group tty) ]; then
usermod -a -G tty www-data usermod -a -G tty $app
fi fi
# Sudo permissions to the user if agreed to # Sudo permissions to the user if agreed to
if [ ${sudo} ]; then if [ ${sudo} ]; then
usermod -a -G "sudo" www-data usermod -a -G "sudo" $app
if [ $(grep "www-data ALL=(ALL) NOPASSWD: ALL" /etc/sudoers | wc -l) -eq 0 ];then if [ $(grep "www-data ALL=(ALL) NOPASSWD: ALL" /etc/sudoers | wc -l) -eq 0 ];then
bash -c 'echo "www-data ALL=(ALL) NOPASSWD: ALL" | (EDITOR="tee -a" visudo)' bash -c 'echo "www-data ALL=(ALL) NOPASSWD: ALL" | (EDITOR="tee -a" visudo)'
fi fi