Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #!/bin/sh
- #
- # README!
- # Please put this script on a level upper of your ubilling installation
- # backup manually directory billing at first time before running this updater
- # Если Убиллинг установлен в /var/www/billing
- # Скрипт автообновления должен лежать в /var/www
- # fetch software (Для Linux тут wget, а не fetch)
- FETCH="wget"
- echo "=== Ubilling auto update ==="
- cd ./billing/
- echo "=== Backup current data ==="
- mkdir ../ub_restore
- rm -fr ../ub_restore/*
- mkdir ../ub_restore/config
- mkdir ../ub_restore/content
- #mkdir ../ub_restore/multinet
- mkdir ../ub_restore/userstats
- mkdir ../ub_restore/userstats/config
- #Custom modules
- #Тут лежит мой модуль для контроля шейпа, можно этот кусок не делать
- mkdir ../ub_restore/modules
- mkdir ../ub_restore/modules/general
- mkdir ../ub_restore/modules/general/pl_scinfo
- mkdir ../ub_restore/skins
- # все дальше как обычно
- cp .htaccess ../ub_restore/
- cp favicon.ico ../ub_restore/
- cp -R ./multinet ../ub_restore/
- cp ./config/alter.ini ../ub_restore/config/
- cp ./config/billing.ini ../ub_restore/config/
- cp ./config/mysql.ini ../ub_restore/config/
- cp ./config/bmagic.ini ../ub_restore/config/
- cp -R ./config/dhcp ../ub_restore/config/
- cp -R ./content/users ../ub_restore/content/
- cp ./config/printcheck.tpl ../ub_restore/config/
- cp ./userstats/config/mysql.ini ../ub_restore/userstats/config/
- cp ./userstats/config/userstats.ini ../ub_restore/userstats/config/
- #Custom modules
- #Тут лежит мой модуль для контроля шейпа, можно этот кусок не делать
- cp ./modules/general/pl_scinfo/index.php ../ub_restore/modules/general/pl_scinfo/
- cp ./modules/general/pl_scinfo/module.php ../ub_restore/modules/general/pl_scinfo/
- cp ./skins/speed.png ../ub_restore/skins/
- # все дальше как обычно
- echo "=== Cleanup ==="
- rm -fr ./*
- echo "=== Downloading new release ==="
- $FETCH http://ubilling.net.ua/ub.tgz
- echo "=== Unpacking ==="
- tar zxvf ub.tgz
- echo "=== Restoring configs ==="
- cp -R ../ub_restore/* ./
- #kill default admin
- #rm -fr ./content/users/admin
- echo "=== Linking True Online ==="
- ln -fs /etc/stargazer/dn /var/www/billing/content/dn
- echo "=== Linking Multinet ==="
- rm -fr ./multinet
- ln -dfs /etc/dhcp3 /var/www/billing/multinet
- echo "=== Setting permissions ==="
- chmod -R 777 content/ config/ multinet/ exports/ remote_nas.conf vservices.php
- #Custom modules
- #Тут лежит мой модуль для контроля шейпа, можно этот кусок не делать
- echo "=== echo translation ==="
- echo '$lang'"['def']['right to show sc info for user']='Право на просмотр информации о скорости пользователя';" >> ./languages/russian/billing.php
- # все дальше как обычно
- echo "===Update complete ==="
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement