Browse Source

fix: change name from ``pandachi`` to ``myc``.

Signed-off-by: Valentin Lab <valentin.lab@kalysto.org>
rc1
Valentin Lab 4 years ago
parent
commit
8e5b8380ec
  1. 19
      bin/myc-install
  2. 20
      bin/myc-update

19
bin/pandachi-install → bin/myc-install

@ -13,7 +13,7 @@ wget http://docker.0k.io/get/ -qO - | bash
clone_or_update() {
local pkg="$1" branch=${2:-master} \
DEPLOY_PATH="/opt/apps" \
GIT_BASE="git.0k.io:/var/git/0k" \
GIT_BASE="https://git.myceliandre.fr/Myceliandre" \
current_branch
if [ -d "$DEPLOY_PATH/$pkg" ]; then
cd "$DEPLOY_PATH/$pkg"
@ -38,16 +38,16 @@ install_bin() {
set -e
clone_or_update pandachi-manage || exit 1
install_bin /opt/apps/pandachi-manage/bin
clone_or_update myc-manage || exit 1
install_bin /opt/apps/myc-manage/bin
clone_or_update pandachi-deploy || exit 1
clone_or_update myc-deploy || exit 1
#[ -e /etc/compose.conf ] || ln -sfv /opt/apps/pandachi-deploy/etc/compose.conf /etc/compose.conf
#[ -e /etc/compose.conf ] || ln -sfv /opt/apps/myc-deploy/etc/compose.conf /etc/compose.conf
## XXXvlab: should get rid of this file in some future
cd /opt/apps/pandachi-deploy
cd /opt/apps/myc-deploy
if ! grep "^DEFAULT_COMPOSE_FILE=$PWD/compose.yml$" /etc/compose/local.conf >/dev/null 2>&1; then
echo "Adding CWD=$PWD to docker-compose."
cat <<EOF >> /etc/compose/local.conf
@ -57,10 +57,7 @@ fi
type -t docker-clean || ln -sfv /opt/apps/0k-docker/src/bin/docker-clean /usr/local/bin
echo "Login into our server."
docker login -u deploy -p deployinvm git.panda-chi.io:5002
cd /opt/apps/pandachi-deploy
cd /opt/apps/myc-deploy
cat <<EOF > /root/.pgm.rc
prefix_pg_local_command=" " ## otherwise, will default to sudo -u postgres
@ -132,4 +129,4 @@ pip install ovh || exit 1
#compose --debug up odoo apache
## Marker to probe if this script finished it's job
echo "done" > /var/run/pandachi-installer.0k.io.state
echo "done" > /var/run/myc-installer.0k.io.state

20
bin/pandachi-update → bin/myc-update

@ -9,30 +9,30 @@ include pretty
start=$SECONDS
if [ -z "$NO_UPDATE" -a -d "/opt/apps/pandachi-manage" ]; then
Elt "Checking if pandachi-manage requires update..."
cd /opt/apps/pandachi-manage
if [ -z "$NO_UPDATE" -a -d "/opt/apps/myc-manage" ]; then
Elt "Checking if myc-manage requires update..."
cd /opt/apps/myc-manage
REMOTE_HEAD="$(git ls-remote origin refs/heads/master 2>/dev/null | cut -f 1)"
HEAD="$(git rev-parse HEAD)"
if [ "$REMOTE_HEAD" != "$HEAD" ]; then
print_info "new version available"
Wrap -d "Update pandachi-manage" <<EOF || exit 1
if ! [ -d "/opt/apps/pandachi-manage" ]; then
Wrap -d "Update myc-manage" <<EOF || exit 1
if ! [ -d "/opt/apps/myc-manage" ]; then
mkdir -p /opt/apps && cd /opt/apps
git clone git.0k.io:/var/git/0k/pandachi-manage.git
git clone https://git.myceliandre.fr/Myceliandre/myc-manage.git
else
cd /opt/apps/pandachi-manage &&
cd /opt/apps/myc-manage &&
git checkout master &&
git pull -r
fi
ln -sfn /opt/apps/pandachi-manage/bin/* /usr/local/sbin/
find -L /usr/local/sbin -maxdepth 1 -type l -ilname /opt/apps/pandachi-manage/bin/\* -delete
ln -sfn /opt/apps/myc-manage/bin/* /usr/local/sbin/
find -L /usr/local/sbin -maxdepth 1 -type l -ilname /opt/apps/myc-manage/bin/\* -delete
EOF
Feed || exit 1
export NO_UPDATE=1
exec pandachi-update
exec myc-update
exit 0
else
print_info "up to date"
Loading…
Cancel
Save