Commit e6f90cd9 authored by Joanne Hugé's avatar Joanne Hugé

ors-upgrade: fix init-sdr and wait before launching ors-upgrade at reboot

parent 47688524
#!/bin/bash #!/bin/bash
AMARISOFT_PATH="/opt/amarisoft/$(ls -1 /opt/amarisoft | grep "^v[0-9]\{4\}-[0-9]\{2\}-[0-9]\{2\}$" | sort | tail -n1)" AMARISOFT_PATH="/opt/amarisoft/$(ls -1 /opt/amarisoft | grep "^v[0-9]\{4\}-[0-9]\{2\}-[0-9]\{2\}$" | sort | tail -n1)"
export PATH="/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:$PATH"
$AMARISOFT_PATH/trx_sdr/sdr_util version && exit; $AMARISOFT_PATH/trx_sdr/sdr_util version && exit;
lsmod | grep -q sdr && rmmod sdr; lsmod | grep -q sdr && rmmod sdr;
......
...@@ -3,4 +3,4 @@ ...@@ -3,4 +3,4 @@
shell: ansible-playbook upgrader-run.yml --extra-vars "upgrader_playbook=ors-upgrade.yml upgrade_kernel=False" shell: ansible-playbook upgrader-run.yml --extra-vars "upgrader_playbook=ors-upgrade.yml upgrade_kernel=False"
- name: Set Cron - name: Set Cron
cron: name="Launch Startup with ansible" special_time=reboot job='cd /opt/upgrader/playbook && ansible-playbook ors-upgrade.yml -i hosts 2>>/opt/upgrader/startup.log >> /opt/upgrader/startup.log' cron: name="Launch Startup with ansible" special_time=reboot job='sleep 20 && cd /opt/upgrader/playbook && ansible-playbook ors-upgrade.yml -i hosts 2>>/opt/upgrader/startup.log >> /opt/upgrader/startup.log'
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment