aboutsummaryrefslogtreecommitdiffstats
path: root/util
diff options
context:
space:
mode:
authorMario Vavti <mario@mariovavti.com>2016-06-09 09:09:13 +0200
committerMario Vavti <mario@mariovavti.com>2016-06-09 09:09:13 +0200
commit11045b92fb2a5af504a8d6cfba1f0fe67107e847 (patch)
tree4170ca20120a23e40bb98c6d6ac57a59b827dc28 /util
parent655290b022f0443a121790ef7f0c1d4ddeecb289 (diff)
parent2ad5010dc3f2f8d077a3228915d28a3e256f6e13 (diff)
downloadvolse-hubzilla-11045b92fb2a5af504a8d6cfba1f0fe67107e847.tar.gz
volse-hubzilla-11045b92fb2a5af504a8d6cfba1f0fe67107e847.tar.bz2
volse-hubzilla-11045b92fb2a5af504a8d6cfba1f0fe67107e847.zip
Merge branch 'dev' into sabre32
Diffstat (limited to 'util')
-rwxr-xr-xutil/addons1
-rwxr-xr-xutil/safemode27
2 files changed, 27 insertions, 1 deletions
diff --git a/util/addons b/util/addons
index 8fcd40cbc..150a7ca09 100755
--- a/util/addons
+++ b/util/addons
@@ -17,7 +17,6 @@ EOT;
require_once('include/cli_startup.php');
cli_startup();
-$a = get_app();
$plugs = get_config('system', 'addon');
$plugins_arr = array();
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
+
+
+