Add script to update from nightly

This commit is contained in:
Keith Whyte 2020-04-29 06:24:13 +02:00
parent e737ba29e4
commit 9685f7598c
3 changed files with 35 additions and 0 deletions

View file

@ -0,0 +1,3 @@
src/gz uri-all-0 https://OPKG_CREDS@downloads.sysmocom.de/generic/sysmobts/201705-nightly/ipk/all
src/gz uri-armv5te-0 https://OPKG_CREDS@downloads.sysmocom.de/generic/sysmobts/201705-nightly/ipk/armv5te
src/gz uri-sysmobts_v2-0 https://OPKG_CREDS@downloads.sysmocom.de/generic/sysmobts/201705-nightly/ipk/sysmobts_v2

View file

@ -0,0 +1,27 @@
#!/bin/bash
# This script will upgrade osmo-* daemons on the BTS
# Depending on circumstances, this might not be safe.
if [ "$PWD" != "/var/SysmoBTS" ]; then
OLDPWD=$PWD
cd /var/SysmoBTS
fi
SSH_OPTS="-o StrictHostKeyChecking=no -o UserKnownHostsFile=/tmp/known-$RANDOM"
. /home/rhizomatica/bin/vars.sh
for bts in "${!BTS[@]}" ; do
if [ "$(ssh $SSH_OPTS ${BTS[$bts]} 'grep 201705 /etc/opkg/base-feeds.conf >/dev/null; echo $?')" == "0" ] ; then
scp $SSH_OPTS base-feeds-nightly.conf root@${BTS[$bts]}:/etc/opkg/base-feeds.conf
ssh $SSH_OPTS root@${BTS[$bts]} "opkg update; opkg install osmo-bts osmo-pcu sysmobts-util ntp"
ssh $SSH_OPTS root@${BTS[$bts]} "systemctl enable osmo-pcu; systemctl start osmo-pcu"
fi
done
if [ "$OLDPWD" != "" ]; then
cd $OLDPWD
fi

View file

@ -497,6 +497,11 @@ schedule { 'repo':
mode => '0750'
}
file { '/var/SysmoBTS/opkg.sh':
source => 'puppet:///modules/rhizo_base/var/SysmoBTS/opkg.sh',
mode => '0750'
}
file { '/var/SysmoBTS/chk_masq':
source => 'puppet:///modules/rhizo_base/var/SysmoBTS/chk_masq',
mode => '0750'