summaryrefslogtreecommitdiffstats
path: root/crates/core/tedge_agent/src
diff options
context:
space:
mode:
authorPradeepKiruvale <pradeepkumar.kj@softwareag.com>2022-04-21 15:03:09 +0530
committerGitHub <noreply@github.com>2022-04-21 15:03:09 +0530
commit001347fd92e0b697a01a591ae68b3316be0d9ec1 (patch)
tree9d3555a8588d9e2cd8640658374812dd359fa0a7 /crates/core/tedge_agent/src
parent7033ab55c70611bec47f2aee79e38de7e88e6d58 (diff)
Have a single unix user used for all the thin-edge daemons (#1085)
* Closes #1031 single tedge user Signed-off-by: Pradeep Kumar K J <pradeepkumar.kj@softwareag.com> * Add script to upgrade tedge from 0.6 Signed-off-by: Pradeep Kumar K J <pradeepkumar.kj@softwareag.com>
Diffstat (limited to 'crates/core/tedge_agent/src')
-rw-r--r--crates/core/tedge_agent/src/agent.rs14
1 files changed, 2 insertions, 12 deletions
diff --git a/crates/core/tedge_agent/src/agent.rs b/crates/core/tedge_agent/src/agent.rs
index ec2d80b6..b7c7ba27 100644
--- a/crates/core/tedge_agent/src/agent.rs
+++ b/crates/core/tedge_agent/src/agent.rs
@@ -226,18 +226,8 @@ impl SmAgent {
#[instrument(skip(self), name = "sm-agent")]
pub async fn init(&mut self, config_dir: PathBuf) -> Result<(), anyhow::Error> {
let cfg_dir = config_dir.as_path().display().to_string();
- create_directory_with_user_group(
- &format!("{cfg_dir}/.agent"),
- "tedge-agent",
- "tedge-agent",
- 0o775,
- )?;
- create_directory_with_user_group(
- "/var/log/tedge/agent",
- "tedge-agent",
- "tedge-agent",
- 0o775,
- )?;
+ create_directory_with_user_group(&format!("{cfg_dir}/.agent"), "tedge", "tedge", 0o775)?;
+ create_directory_with_user_group("/var/log/tedge/agent", "tedge", "tedge", 0o775)?;
info!("Initializing the tedge agent session");
mqtt_channel::init_session(&self.config.mqtt_config).await?;