Add backup/restore scripts

This commit is contained in:
Julien VAUBOURG
2015-07-25 16:33:38 +02:00
parent 40ba05ad1b
commit 1a9ef49ea5
4 changed files with 26 additions and 3 deletions

View File

@@ -18,7 +18,7 @@
# along with this program. If not, see <http://www.gnu.org/licenses/>.
# This is an upgrade?
upgrade=$([ "$HOTSPOT_UPGRADE" == 1 ] && echo true || echo false)
upgrade=$([ "${HOTSPOT_UPGRADE}" == 1 ] && echo true || echo false)
# Retrieve arguments
domain=${1}
@@ -119,7 +119,7 @@ if ! $upgrade; then
echo "ERROR: No wifi interface found" >&2
exit 1
fi
# Save arguments
sudo yunohost app setting hotspot service_enabled -v 1
sudo yunohost app setting hotspot multissid -v 1
@@ -140,6 +140,10 @@ if ! $upgrade; then
fi
# Save git commit
gitcommit=$(git rev-parse HEAD)
sudo yunohost app setting hotspot gitcommit -v "${gitcommit}"
# Install custom scripts
sudo install -o root -g root -m 0755 ../conf/iw_multissid /usr/local/bin/
sudo install -o root -g root -m 0755 ../conf/iw_devices /usr/local/bin/