aboutsummaryrefslogtreecommitdiffstats
path: root/util/safemode
diff options
context:
space:
mode:
authorredmatrix <git@macgirvin.com>2016-06-06 16:34:10 -0700
committerredmatrix <git@macgirvin.com>2016-06-06 16:34:10 -0700
commit82a81cd01fb199ea35147f1269a99c2d4bff40d7 (patch)
tree94270a007150333fbc91100e6b631b41495c7b47 /util/safemode
parentc0d80a58284baa7dc4ac05b5628a43e8743ac4f0 (diff)
downloadvolse-hubzilla-82a81cd01fb199ea35147f1269a99c2d4bff40d7.tar.gz
volse-hubzilla-82a81cd01fb199ea35147f1269a99c2d4bff40d7.tar.bz2
volse-hubzilla-82a81cd01fb199ea35147f1269a99c2d4bff40d7.zip
new utility: util/safemode (on or off); requires util/addons
Diffstat (limited to 'util/safemode')
-rwxr-xr-xutil/safemode27
1 files changed, 27 insertions, 0 deletions
diff --git a/util/safemode b/util/safemode
new file mode 100755
index 000000000..05ddbeafe
--- /dev/null
+++ b/util/safemode
@@ -0,0 +1,27 @@
+#!/usr/bin/env bash
+
+if [ $# == 0 ] ; then
+ echo Usage: $0 on '|' $0 off
+ echo on saves current addons to addons-safemode and uninstalls all of them
+ echo off installs all addons in addons-safemode
+ exit
+fi
+
+
+if [ $1 == 'on' ] ; then
+ util/addons list > addons-safemode
+ for a in `cat addons-safemode` ; do
+ util/addons uninstall $a
+ done
+ exit
+fi
+
+if [ $1 == 'off' ] ; then
+ for a in `cat addons-safemode` ; do
+ util/addons install $a
+ done
+ exit
+fi
+
+
+