Files
runner-images-PK/images/ubuntu/scripts/build/configure-system.sh
T

34 lines
932 B
Bash
Raw Normal View History

2020-10-07 13:49:40 +05:00
#!/bin/bash -e
2020-09-21 11:18:28 +03:00
################################################################################
2023-11-22 21:49:23 +01:00
## File: configure-system.sh
## Desc: Post deployment system configuration actions
2020-09-21 11:18:28 +03:00
################################################################################
# Source the helpers for use with the script
source $HELPER_SCRIPT_FOLDER/etc-environment.sh
mv -f /imagegeneration/post-generation /opt
2021-11-15 18:35:50 +01:00
echo "chmod -R 777 /opt"
chmod -R 777 /opt
echo "chmod -R 777 /usr/share"
chmod -R 777 /usr/share
chmod 755 $IMAGE_FOLDER
2020-11-03 15:56:49 +03:00
# Remove quotes around PATH
2020-11-05 22:08:19 +03:00
ENVPATH=$(grep 'PATH=' /etc/environment | head -n 1 | sed -z 's/^PATH=*//')
2020-11-05 10:36:01 +03:00
ENVPATH=${ENVPATH#"\""}
ENVPATH=${ENVPATH%"\""}
replace_etc_environment_variable "PATH" "${ENVPATH}"
2020-11-05 10:36:01 +03:00
echo "Updated /etc/environment: $(cat /etc/environment)"
2020-10-27 17:24:59 +03:00
2023-11-22 21:49:23 +01:00
# Сlean yarn and npm cache
2023-12-29 12:36:27 +01:00
if yarn --version > /dev/null; then
yarn cache clean
fi
2023-12-29 12:36:27 +01:00
if npm --version; then
npm cache clean --force
fi