2022-06-24 18:48:34 +02:00
|
|
|
#!/bin/bash
|
|
|
|
|
|
|
|
echo ${TARGETBUILD} > /buildtarget.txt
|
|
|
|
if [[ "${TARGETBUILD}" = "aas" ]]; then
|
|
|
|
# Azure AppService uses /home for persisent data & SSH on port 2222
|
2022-08-11 13:08:56 +02:00
|
|
|
DATA_DIR=/home
|
2022-09-07 11:51:53 +02:00
|
|
|
mkdir -p $DATA_DIR/{search,minio,couch}
|
|
|
|
mkdir -p $DATA_DIR/couch/{dbs,views}
|
|
|
|
chown -R couchdb:couchdb $DATA_DIR/couch/
|
2022-06-24 18:48:34 +02:00
|
|
|
apt update
|
|
|
|
apt-get install -y openssh-server
|
2022-09-13 17:08:54 +02:00
|
|
|
echo "root:Docker!" | chpasswd
|
|
|
|
mkdir -p /tmp
|
|
|
|
chmod +x /tmp/ssh_setup.sh \
|
|
|
|
&& (sleep 1;/tmp/ssh_setup.sh 2>&1 > /dev/null)
|
|
|
|
cp /etc/sshd_config /etc/ssh/sshd_config
|
2022-06-24 18:48:34 +02:00
|
|
|
/etc/init.d/ssh restart
|
2022-08-16 16:08:00 +02:00
|
|
|
sed -i "s#DATA_DIR#/home#g" /opt/clouseau/clouseau.ini
|
|
|
|
sed -i "s#DATA_DIR#/home#g" /opt/couchdb/etc/local.ini
|
|
|
|
else
|
|
|
|
sed -i "s#DATA_DIR#/data#g" /opt/clouseau/clouseau.ini
|
|
|
|
sed -i "s#DATA_DIR#/data#g" /opt/couchdb/etc/local.ini
|
|
|
|
fi
|