mirror of
https://github.com/OpenNebula/one.git
synced 2026-11-21 04:12:37 +09:00
feature #1505: install opennebula.js and appflow_auth
This commit is contained in:
1 parent
590e8d51d7
commit
6b261b585e
1 file changed
+32
@@ -2,6 +2,10 @@
|
||||
|
||||
SUNSTONE_PLUGINS=/etc/one/sunstone-plugins.yaml
|
||||
SUNSTONE_SERVER=/etc/one/sunstone-server.conf
|
||||
OPENNEBULA_JS=/usr/lib/one/sunstone/public/js/opennebula.js
|
||||
OPENNEBULA_JS_NEW=/usr/share/one/oneapps/sunstone/public/js/opennebula.js
|
||||
SUNSTONE_AUTH="$HOME/.one/sunstone_auth"
|
||||
APPFLOW_AUTH="$HOME/.one/appflow_auth"
|
||||
|
||||
function print_install_message() {
|
||||
cat <<EOT
|
||||
@@ -28,6 +32,15 @@ OpenNebula Apps needs the folowing dependencies to run correctly:
|
||||
EOT
|
||||
}
|
||||
|
||||
function make_backup() {
|
||||
file=$1
|
||||
backup="$1.$(date '+%s')"
|
||||
|
||||
if [ -f "$file" ]; then
|
||||
cp "$file" "$backup"
|
||||
fi
|
||||
}
|
||||
|
||||
function add_config() {
|
||||
name=$1
|
||||
text=$2
|
||||
@@ -44,6 +57,12 @@ function add_server() {
|
||||
add_config "$1" "$2" "$SUNSTONE_SERVER"
|
||||
}
|
||||
|
||||
|
||||
# Configure sunstone-plugins.yaml and sunstone-server.conf
|
||||
|
||||
make_backup "$SUNSTONE_PLUGINS"
|
||||
make_backup "$SUNSTONE_SERVER"
|
||||
|
||||
add_plugin "apptools.appstage-dashboard.js" \
|
||||
"- user-plugins/apptools.appstage-dashboard.js:
|
||||
:user:
|
||||
@@ -90,6 +109,19 @@ add_server "- appstage" " - appstage"
|
||||
add_server "- appflow" " - appflow"
|
||||
add_server "- appmarket" " - appmarket"
|
||||
|
||||
|
||||
# Install new opennebula.js
|
||||
|
||||
make_backup "$OPENNEBULA_JS"
|
||||
cp "$OPENNEBULA_JS_NEW" "$OPENNEBULA_JS"
|
||||
|
||||
|
||||
# Copy sunstone_auth to appflow_auth
|
||||
|
||||
make_backup "$APPFLOW_AUTH"
|
||||
cp "$SUNSTONE_AUTH" "$APPFLOW_AUTH"
|
||||
|
||||
|
||||
print_install_message
|
||||
|
||||
|
||||
Reference in new issue
Block a user