Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
E
envsetup
Manage
Activity
Members
Plan
Redmine
Code
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Releases
Container Registry
Model registry
Analyze
Contributor analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
mediaserver
envsetup
Commits
d9486dae
Commit
d9486dae
authored
8 years ago
by
Stéphane Diemer
Browse files
Options
Downloads
Patches
Plain Diff
Changed conf generation (refs
#19005
).
parent
1163a2a2
No related branches found
No related tags found
No related merge requests found
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
21.Initialize_environment/0_setup.sh
+6
-2
6 additions, 2 deletions
21.Initialize_environment/0_setup.sh
22.Initialize_configuration_file/0_setup.sh
+7
-29
7 additions, 29 deletions
22.Initialize_configuration_file/0_setup.sh
conf.sh
+1
-1
1 addition, 1 deletion
conf.sh
with
14 additions
and
32 deletions
21.Initialize_environment/0_setup.sh
+
6
−
2
View file @
d9486dae
...
...
@@ -14,12 +14,16 @@ nameserver 192.168.40.6
EOF
# set ubicast account pwd
echo
-e
"
${
SHELL_UBICAST_PWD
}
\n
${
SHELL_UBICAST_PWD
}
"
|
(
passwd
-q
ubicast
)
if
(
!
test
-z
${
SHELL_UBICAST_PWD
}
)
;
then
echo
-e
"
${
SHELL_UBICAST_PWD
}
\n
${
SHELL_UBICAST_PWD
}
"
| passwd
-q
ubicast
fi
# create admin account
useradd
-m
admin
--shell
/bin/bash
echo
-e
"
${
SHELL_ADMIN_PWD
}
\n
${
SHELL_ADMIN_PWD
}
"
|
(
passwd
-q
admin
)
usermod
-aG
sudo
admin
if
(
!
test
-z
${
SHELL_ADMIN_PWD
}
)
;
then
echo
-e
"
${
SHELL_ADMIN_PWD
}
\n
${
SHELL_ADMIN_PWD
}
"
| passwd
-q
admin
fi
# migrate to Ubuntu 16.04 / apply sources.list
if
[
$(
cat
/etc/lsb-release |
grep
DISTRIB_RELEASE |
awk
-F
"="
'{print$2}'
)
=
"16.04"
]
...
...
This diff is collapsed.
Click to expand it.
22.Initialize_configuration_file/0_setup.sh
+
7
−
29
View file @
d9486dae
#!/bin/bash
source
/root/envsetup/conf.sh
# Conf setup
sed
-i
"s@^NTP_SERVER1 = .*@NTP_SERVER1 = '
${
NTP
}
'@"
/root/envsetup/conf.py
sed
-i
"s@^EMAIL_SMTP_SERVER = .*@EMAIL_SMTP_SERVER = '
${
EMAIL_SMTP_SERVER
}
'@"
/root/envsetup/conf.py
sed
-i
"s@^MYSQL_ROOT_PWD = .*@MYSQL_ROOT_PWD = '
${
MYSQL_ROOT_PWD
}
'@"
/root/envsetup/conf.py
# Wowza
sed
-i
"s@^wowza_server_name = .*@wowza_server_name = '
${
WOWZA
}
'@"
/root/envsetup/conf.py
sed
-i
"s@^WOWZA_MANAGER_PWD = .*@WOWZA_MANAGER_PWD = '
${
WOWZA_MANAGER_PWD
}
'@"
/root/envsetup/conf.py
sed
-i
"s@^WOWZA_LICENSE = .*@WOWZA_LICENSE = '
${
WOWZA_LICENSE
}
'@"
/root/envsetup/conf.py
sed
-i
"s@^WOWZA_LIVE_PWD = .*@WOWZA_LIVE_PWD = '
${
WOWZA_LIVE_PWD
}
'@"
/root/envsetup/conf.py
# MS
sed
-i
"s@^MS_SERVER_NAME = .*@MS_SERVER_NAME = '
${
MS_SERVER_NAME
}
'@"
/root/envsetup/conf.py
sed
-i
"s@^MS_SUPERUSER_PWD = .*@MS_SUPERUSER_PWD = '
${
SUPERUSER_PWD
}
'@"
/root/envsetup/conf.py
sed
-i
"s@^MS_ADMIN_PWD = .*@MS_ADMIN_PWD = '
${
ADMIN_PWD
}
'@"
/root/envsetup/conf.py
# Autogenerate missing values
if
[
"
${
MS_ID
}
"
=
""
]
;
then
MS_ID
=
$(
echo
"
$(
hostname
)
_msuser"
)
fi
...
...
@@ -22,22 +10,12 @@ if [ "${MS_API_KEY}" = "" ]; then
# respect API pattern
MS_API_KEY
=
$(
echo
$MS_API_KEY
|
sed
"s@[iloILO]@
$((${
RANDOM
}
/
10000
))
@g"
)
fi
if
[
"
${
MS_SECRET
}
"
=
""
]
;
then
if
[
"
${
MS_SECRET
}
"
=
"
secret
"
]
;
then
MS_SECRET
=
$(
echo
"
$(
pwgen 40
)
"
)
fi
sed
-i
"s@^MS_ID = .*@MS_ID = '
${
MS_ID
}
'@"
/root/envsetup/conf.py
sed
-i
"s@^MS_API_KEY = .*@MS_API_KEY = '
${
MS_API_KEY
}
'@"
/root/envsetup/conf.py
sed
-i
"s@^MS_SECRET = .*@MS_SECRET = '
${
MS_SECRET
}
'@"
/root/envsetup/conf.py
# SK
sed
-i
"s@^CM_SERVER_NAME = .*@CM_SERVER_NAME = '
${
CM
}
'@"
/root/envsetup/conf.py
sed
-i
"s@^CM_SUPERUSER_PWD = .*@CM_SUPERUSER_PWD = '
${
CM_SUPERUSER_PWD
}
'@"
/root/envsetup/conf.py
sed
-i
"s@^CM_ADMIN_PWD = .*@CM_ADMIN_PWD = '
${
CM_ADMIN_PWD
}
'@"
/root/envsetup/conf.py
# Monitor
sed
-i
"s@^MONITOR_SERVER_NAME = .*@MONITOR_SERVER_NAME = '
${
MONITOR
}
'@"
/root/envsetup/conf.py
sed
-i
"s@^MONITOR_SUPERUSER_PWD = .*@MONITOR_SUPERUSER_PWD = '
${
MONITOR_SUPERUSER_PWD
}
'@"
/root/envsetup/conf.py
sed
-i
"s@^MONITOR_ADMIN_PWD = .*@MONITOR_ADMIN_PWD = '
${
MONITOR_ADMIN_PWD
}
'@"
/root/envsetup/conf.py
# Worker
sed
-i
"s@^CELERITY_SIGNING_KEY = .*@CELERITY_SIGNING_KEY = '
${
CELERITY_SIGNING_KEY
}
'@"
/root/envsetup/conf.py
# IP for whitelist
sed
-i
"s@^MS_ID=.*@MS_ID='
${
MS_ID
}
'@"
/root/envsetup/conf.sh
sed
-i
"s@^MS_API_KEY=.*@MS_API_KEY='
${
MS_API_KEY
}
'@"
/root/envsetup/conf.sh
sed
-i
"s@^MS_SECRET=.*@MS_SECRET='
${
MS_SECRET
}
'@"
/root/envsetup/conf.sh
# Worker IP for whitelist
CELERITY_WORKER_IP
=
$(
ip addr show |
grep
inet |
grep
-v
127 |
grep
-v
":"
|
awk
-F
" "
'{print$2}'
|
awk
-F
"/"
'{print$1}'
)
sed
-i
"s@^CELERITY_CELERITY_WORKER_IP
=
.*@CELERITY_CELERITY_WORKER_IP
=
'
${
CELERITY_WORKER_IP
}
'@"
/root/envsetup/conf.
py
sed
-i
"s@^CELERITY_CELERITY_WORKER_IP
=
.*@CELERITY_CELERITY_WORKER_IP
=
'
${
CELERITY_WORKER_IP
}
'@"
/root/envsetup/conf.
sh
This diff is collapsed.
Click to expand it.
conf.sh
+
1
−
1
View file @
d9486dae
...
...
@@ -2,6 +2,6 @@
# Envsetup local configuration file
# See default configuration in default-conf.sh
source
default-conf.sh
source
/root/envsetup/
default-conf.sh
# Put your configuration here
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment