Add script to update from nightly
This commit is contained in:
parent
e737ba29e4
commit
9685f7598c
3 changed files with 35 additions and 0 deletions
|
@ -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
|
27
modules/rhizo_base/files/var/SysmoBTS/opkg.sh
Normal file
27
modules/rhizo_base/files/var/SysmoBTS/opkg.sh
Normal 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
|
|
@ -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'
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue