summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--configuration/debian/tedge/preinst6
-rw-r--r--configuration/debian/tedge_agent/postinst2
-rw-r--r--configuration/debian/tedge_mapper/postinst4
3 files changed, 6 insertions, 6 deletions
diff --git a/configuration/debian/tedge/preinst b/configuration/debian/tedge/preinst
index b2843104..ec91f6e8 100644
--- a/configuration/debian/tedge/preinst
+++ b/configuration/debian/tedge/preinst
@@ -3,13 +3,13 @@ set -e
### Create groups
if ! getent group tedge >/dev/null; then
- addgroup --quiet --system tedge
+ groupadd --system tedge
fi
### Create users
-# Create user tedge with no additional info(--gecos "") no home(--no-create-home), no login(--shell) and in group tedge(--ingroup)
+# Create user tedge with no home(--no-create-home), no login(--shell) and in group tedge(--gid)
if ! getent passwd tedge >/dev/null; then
- adduser --quiet --system --gecos "" --no-create-home --disabled-login --shell /sbin/nologin --ingroup tedge tedge
+ useradd --system --no-create-home --shell /sbin/nologin --gid tedge tedge
fi
### Create file in /etc/sudoers.d directory. With this configuration, the tedge user have the right to call the tedge command with sudo rights, which is required for system-wide configuration in "/etc/tedge"
diff --git a/configuration/debian/tedge_agent/postinst b/configuration/debian/tedge_agent/postinst
index 4059b182..348ebe12 100644
--- a/configuration/debian/tedge_agent/postinst
+++ b/configuration/debian/tedge_agent/postinst
@@ -13,6 +13,6 @@ if command -v systemctl >/dev/null; then
fi
# Initialize the agent
-runuser -u tedge -- tedge_agent --init
+sudo -u tedge -- tedge_agent --init
#DEBHELPER#
diff --git a/configuration/debian/tedge_mapper/postinst b/configuration/debian/tedge_mapper/postinst
index bb12342a..a637165f 100644
--- a/configuration/debian/tedge_mapper/postinst
+++ b/configuration/debian/tedge_mapper/postinst
@@ -4,6 +4,6 @@ set -e
### Initialize the sm mapper
-runuser -u tedge -- tedge_mapper --init c8y
-runuser -u tedge -- tedge_mapper --init az
+sudo -u tedge -- tedge_mapper --init c8y
+sudo -u tedge -- tedge_mapper --init az
#DEBHELPER#