From 26df53f530157f91344f0618c5987944ee0529b7 Mon Sep 17 00:00:00 2001 From: yalh76 Date: Fri, 22 Jul 2022 13:44:46 +0200 Subject: [PATCH] usermod to $app --- scripts/install | 8 ++++---- scripts/restore | 8 ++++---- scripts/upgrade | 8 ++++---- 3 files changed, 12 insertions(+), 12 deletions(-) diff --git a/scripts/install b/scripts/install index 3d957de..00f4d9a 100644 --- a/scripts/install +++ b/scripts/install @@ -123,18 +123,18 @@ chown $app:www-data -R /tmp/jeedom # For nginx user to be able to communicate with home automation devices if [ $(getent group dialout) ]; then - usermod -a -G dialout www-data + usermod -a -G dialout $app fi if [ $(getent group gpio) ]; then - usermod -a -G gpio www-data + usermod -a -G gpio $app fi if [ $(getent group tty) ]; then - usermod -a -G tty www-data + usermod -a -G tty $app fi # Sudo permissions to the user if agreed to 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 bash -c 'echo "www-data ALL=(ALL) NOPASSWD: ALL" | (EDITOR="tee -a" visudo)' fi diff --git a/scripts/restore b/scripts/restore index 039acdc..fdf45e7 100644 --- a/scripts/restore +++ b/scripts/restore @@ -101,18 +101,18 @@ chown $app:www-data -R /tmp/jeedom # For nginx user to be able to communicate with home automation devices if [ $(getent group dialout) ]; then - usermod -a -G dialout www-data + usermod -a -G dialout $app fi if [ $(getent group gpio) ]; then - usermod -a -G gpio www-data + usermod -a -G gpio $app fi if [ $(getent group tty) ]; then - usermod -a -G tty www-data + usermod -a -G tty $app fi # Sudo permissions to the user if agreed to 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 bash -c 'echo "www-data ALL=(ALL) NOPASSWD: ALL" | (EDITOR="tee -a" visudo)' fi diff --git a/scripts/upgrade b/scripts/upgrade index ba8162a..93ec1e0 100644 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -128,18 +128,18 @@ chown $app:www-data -R /tmp/jeedom # For nginx user to be able to communicate with home automation devices if [ $(getent group dialout) ]; then - usermod -a -G dialout www-data + usermod -a -G dialout $app fi if [ $(getent group gpio) ]; then - usermod -a -G gpio www-data + usermod -a -G gpio $app fi if [ $(getent group tty) ]; then - usermod -a -G tty www-data + usermod -a -G tty $app fi # Sudo permissions to the user if agreed to 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 bash -c 'echo "www-data ALL=(ALL) NOPASSWD: ALL" | (EDITOR="tee -a" visudo)' fi