new utility: util/safemode (on or off); requires util/addons
This commit is contained in:
parent
c0d80a5828
commit
82a81cd01f
@ -17,7 +17,6 @@ EOT;
|
|||||||
require_once('include/cli_startup.php');
|
require_once('include/cli_startup.php');
|
||||||
|
|
||||||
cli_startup();
|
cli_startup();
|
||||||
$a = get_app();
|
|
||||||
|
|
||||||
$plugs = get_config('system', 'addon');
|
$plugs = get_config('system', 'addon');
|
||||||
$plugins_arr = array();
|
$plugins_arr = array();
|
||||||
|
27
util/safemode
Executable file
27
util/safemode
Executable file
@ -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
|
||||||
|
|
||||||
|
|
||||||
|
|
Reference in New Issue
Block a user