pre_upgrade.sh 513 B

1234567891011121314
  1. #!/bin/sh
  2. prepare_sn_upgrade() {
  3. UPGRADELOG=/tmp/sn-upgrade.log
  4. echo "Prepare SN LSP for upgrade to version $1" > $UPGRADELOG
  5. /opt/secretnet/sbin/snunblock 1>>$UPGRADELOG 2>&1
  6. # Сохранение конфигурации
  7. /opt/secretnet/bin/snbckctl --backup=users,snsettings 1>>$UPGRADELOG 2>&1
  8. mkdir -p /opt/secretnet-archive/usr/backup 1>>$UPGRADELOG 2>&1
  9. cp -Rf /opt/secretnet/usr/backup/* /opt/secretnet-archive/usr/backup 1>>$UPGRADELOG 2>&1
  10. }
  11. SN_VERSION=1.7-471
  12. prepare_sn_upgrade "$SN_VERSION"