https://www.shellcheck.net/ recommended the backslash and Bash Formatting added these lines

pull/233/head
Carlitos Melgar 6 years ago
parent 791e523126
commit 089b9ceedb

@ -162,12 +162,15 @@ if [ $GENERATE_RANDOM_PASSWORD = "True" ]; then
echo -e "\n---- Generating random admin password ----\n"
OE_SUPERADMIN=$(cat /dev/urandom | tr -dc 'a-zA-Z0-9' | fold -w 16 | head -n 1)
fi
sudo su root -c "printf 'admin_passwd = ${OE_SUPERADMIN}\n' >> /etc/${OE_CONFIG}.conf"
if [ $OE_VERSION > "11.0" ];then
if [ $OE_VERSION \> "11.0" ]; then
sudo su root -c "printf 'http_port = ${OE_PORT}\n' >> /etc/${OE_CONFIG}.conf"
else
sudo su root -c "printf 'xmlrpc_port = ${OE_PORT}\n' >> /etc/${OE_CONFIG}.conf"
fi
sudo su root -c "printf 'logfile = /var/log/${OE_USER}/${OE_CONFIG}.log\n' >> /etc/${OE_CONFIG}.conf"
if [ $IS_ENTERPRISE = "True" ]; then
@ -175,6 +178,7 @@ if [ $IS_ENTERPRISE = "True" ]; then
else
sudo su root -c "printf 'addons_path=${OE_HOME_EXT}/addons,${OE_HOME}/custom/addons\n' >> /etc/${OE_CONFIG}.conf"
fi
sudo chown $OE_USER:$OE_USER /etc/${OE_CONFIG}.conf
sudo chmod 640 /etc/${OE_CONFIG}.conf

Loading…
Cancel
Save