summaryrefslogtreecommitdiffstats
path: root/configuration/debian/tedge_agent
diff options
context:
space:
mode:
authorPradeepKiruvale <pradeepkumar.kj@softwareag.com>2022-03-24 13:35:38 +0530
committerGitHub <noreply@github.com>2022-03-24 13:35:38 +0530
commit59142ef60484ddc7b103c841d34b308b9444f316 (patch)
treed7b8f89179d2244a1e116081b11a28e7c3a141fa /configuration/debian/tedge_agent
parentd9ca6aedfad3de7931964200f26e40fdd577b48a (diff)
[#761] tedge init (#993)
* tedge init #Closes 761 * add file/directory creation errors * add the clear session to az and collectd mappers * refactor tedgecomponent * remove redundant code * subscribe to az/collectd topics in init_session * remove duplicate init_sessions
Diffstat (limited to 'configuration/debian/tedge_agent')
-rw-r--r--configuration/debian/tedge_agent/postinst8
1 files changed, 1 insertions, 7 deletions
diff --git a/configuration/debian/tedge_agent/postinst b/configuration/debian/tedge_agent/postinst
index 774c3b09..7430e3dc 100644
--- a/configuration/debian/tedge_agent/postinst
+++ b/configuration/debian/tedge_agent/postinst
@@ -11,6 +11,7 @@ fi
# Create user tedge-agent with no home(--no-create-home), no login(--shell) and in group tedge-agent(--ingroup)
if ! getent passwd tedge-agent >/dev/null; then
adduser --quiet --system --no-create-home --ingroup tedge-agent --shell /usr/sbin/nologin tedge-agent
+ adduser tedge-agent tedge
fi
### Create file in /etc/sudoers.d directory
@@ -21,13 +22,6 @@ if [ -f "/etc/sudoers.d/010_pi-nopasswd" ]; then
echo "%tedge-agent ALL = (ALL) NOPASSWD: /etc/tedge/sm-plugins/[a-zA-Z0-9]*, /bin/sync, /sbin/init" >/etc/sudoers.d/tedge-agent-nopasswd
fi
-### Create directories
-# Create tedge-agent state directory /etc/tedge/.agent
-install -g tedge-agent -o tedge-agent -m 754 -d /etc/tedge/.agent
-
-# Create /var/log/tedge/agent directory
-install -g tedge-agent -o tedge-agent -m 755 -d /var/log/tedge/agent
-
# Reenable the services only if systemctl is available
if command -v systemctl >/dev/null; then
### Enable the sm services if the device is connected to c8y cloud