Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
D
debomatic-webui
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
debomatic-webui-admins
debomatic-webui
Commits
272533fc
Commit
272533fc
authored
Mar 16, 2014
by
Leo Iannacone
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
auto export user configuration on npm install
parent
08e83618
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
63 additions
and
5 deletions
+63
-5
.gitignore
.gitignore
+2
-1
debomatic-webui/lib/config.js
debomatic-webui/lib/config.js
+15
-4
debomatic-webui/scripts/install.sh
debomatic-webui/scripts/install.sh
+2
-0
debomatic-webui/scripts/install/create-user-config.py
debomatic-webui/scripts/install/create-user-config.py
+44
-0
No files found.
.gitignore
View file @
272533fc
*/node_modules
debomatic-webui/public/external_libs
*/*/external_libs
*/user.config.js
\ No newline at end of file
debomatic-webui/lib/config.js
View file @
272533fc
var
config
=
{}
/*
* Please DO NOT edit this file.
*
* Edit auto-generated "user.config.js" file instead.
*
*/
config
.
version
=
'
0.1-b1
'
// #start config-auto-export
var
config
=
{}
config
.
host
=
'
localhost
'
config
.
port
=
3000
config
.
user
=
'
www-data
'
// who will run server
config
.
user
=
'
www-data
'
// who will run server
[not fully tested yet]
config
.
debomatic
=
{}
config
.
debomatic
.
path
=
'
/srv/debomatic-amd64
'
...
...
@@ -37,7 +43,12 @@ config.web.preferences.file_background = true
config
.
web
.
preferences
.
file_fontsize
=
13
// valid values are [13..16]
config
.
web
.
preferences
.
debug
=
0
// debug level - 0 means disabled
// DO NOT EDIT these ones
// #end config-auto-export
// DO NOT TOUCH these ones
config
.
version
=
'
0.1-b1
'
// A simple function to quickly have
// get and set strings for client events
...
...
debomatic-webui/scripts/install.sh
View file @
272533fc
...
...
@@ -4,3 +4,5 @@ export SCRIPTS_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
bash
${
SCRIPTS_DIR
}
/install/remove_css_directory_listing.sh
bash
${
SCRIPTS_DIR
}
/install/download_external_libs.sh
python
${
SCRIPTS_DIR
}
/install/create-user-config.py
\ No newline at end of file
debomatic-webui/scripts/install/create-user-config.py
0 → 100644
View file @
272533fc
#!/usr/bin/python
# create a user.config.js file starting from lib/config.js
import
os
base_path
=
os
.
environ
[
'SCRIPTS_DIR'
]
global_config_file
=
os
.
path
.
join
(
base_path
,
'../lib/config.js'
)
user_config_file
=
os
.
path
.
join
(
base_path
,
'../user.config.js'
)
if
os
.
path
.
isfile
(
user_config_file
):
print
(
"A config user file already exists. Skipping creation."
)
print
user_config_file
exit
()
export_header
=
"""
/*
* debomatic-webui user configuration
*/
"""
export_config
=
[]
with
open
(
global_config_file
)
as
fd
:
start
=
False
for
line
in
fd
:
if
line
.
find
(
'#start config-auto-export'
)
>=
0
:
start
=
True
continue
elif
line
.
find
(
'#end config-auto-export'
)
>=
0
:
break
if
start
:
export_config
.
append
(
line
)
export_config
.
append
(
'// DO NOT EDIT THIS LINE:
\
n
'
)
export_config
.
append
(
'module.exports = config'
)
print
(
"Creating user configuration ..."
)
with
open
(
user_config_file
,
'w'
)
as
fd
:
fd
.
write
(
export_header
)
fd
.
write
(
''
.
join
(
export_config
))
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment