Skip to content

Commit

Permalink
Change Parallelstore installation script to not move log folder for d…
Browse files Browse the repository at this point in the history
…ebian/ubuntu

Change Parallelstore installation script to not move log folder for debian/ubuntu
  • Loading branch information
abbas1902 authored Aug 20, 2024
2 parents d5a2c32 + fc837f0 commit fc37f6e
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 10 deletions.
10 changes: 5 additions & 5 deletions modules/file-system/parallelstore/scripts/install-daos-client.sh
Original file line number Diff line number Diff line change
Expand Up @@ -90,13 +90,13 @@ sed -i "s/#.*transport_config/transport_config/g" $daos_config
sed -i "s/#.*allow_insecure:.*false/ allow_insecure: true/g" $daos_config
sed -i "s/.*access_points.*/access_points: $access_points/g" $daos_config

# Move agent log destination from /tmp/ (default) to /var/log/daos_agent/
mkdir -p /var/log/daos_agent
chown daos_agent:daos_agent /var/log/daos_agent
sed -i "s/#.*log_file:.*/log_file: \/var\/log\/daos_agent\/daos_agent.log/g" $daos_config

# Start service
if { [ "${OS_ID}" = "rocky" ] || [ "${OS_ID}" = "rhel" ]; } && { [ "${OS_VERSION_MAJOR}" = "8" ] || [ "${OS_VERSION_MAJOR}" = "9" ]; }; then
# TODO: Update script to change default log destination folder, after daos_agent user is supported in debian and ubuntu.
# Move agent log destination from /tmp/ (default) to /var/log/daos_agent/
mkdir -p /var/log/daos_agent
chown daos_agent:daos_agent /var/log/daos_agent
sed -i "s/#.*log_file:.*/log_file: \/var\/log\/daos_agent\/daos_agent.log/g" $daos_config
systemctl start daos_agent.service
elif { [ "${OS_ID}" = "ubuntu" ] && [ "${OS_VERSION}" = "22.04" ]; } || { [ "${OS_ID}" = "debian" ] && [ "${OS_VERSION_MAJOR}" = "12" ]; }; then
mkdir -p /var/run/daos_agent
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -90,13 +90,13 @@ sed -i "s/#.*transport_config/transport_config/g" $daos_config
sed -i "s/#.*allow_insecure:.*false/ allow_insecure: true/g" $daos_config
sed -i "s/.*access_points.*/access_points: $access_points/g" $daos_config

# Move agent log destination from /tmp/ (default) to /var/log/daos_agent/
mkdir -p /var/log/daos_agent
chown daos_agent:daos_agent /var/log/daos_agent
sed -i "s/#.*log_file:.*/log_file: \/var\/log\/daos_agent\/daos_agent.log/g" $daos_config

# Start service
if { [ "${OS_ID}" = "rocky" ] || [ "${OS_ID}" = "rhel" ]; } && { [ "${OS_VERSION_MAJOR}" = "8" ] || [ "${OS_VERSION_MAJOR}" = "9" ]; }; then
# TODO: Update script to change default log destination folder, after daos_agent user is supported in debian and ubuntu.
# Move agent log destination from /tmp/ (default) to /var/log/daos_agent/
mkdir -p /var/log/daos_agent
chown daos_agent:daos_agent /var/log/daos_agent
sed -i "s/#.*log_file:.*/log_file: \/var\/log\/daos_agent\/daos_agent.log/g" $daos_config
systemctl start daos_agent.service
elif { [ "${OS_ID}" = "ubuntu" ] && [ "${OS_VERSION}" = "22.04" ]; } || { [ "${OS_ID}" = "debian" ] && [ "${OS_VERSION_MAJOR}" = "12" ]; }; then
mkdir -p /var/run/daos_agent
Expand Down

0 comments on commit fc37f6e

Please sign in to comment.