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
e275f5ce
Commit
e275f5ce
authored
8 years ago
by
Stéphane Diemer
Browse files
Options
Downloads
Patches
Plain Diff
Changed default network values.
parent
4b90d703
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
20.Client_configuration/1.Apply_client_configuration/0_setup.sh
+26
-20
26 additions, 20 deletions
...ent_configuration/1.Apply_client_configuration/0_setup.sh
global-conf.sh
+6
-6
6 additions, 6 deletions
global-conf.sh
tests/test_dns_records.py
+1
-1
1 addition, 1 deletion
tests/test_dns_records.py
with
33 additions
and
27 deletions
20.Client_configuration/1.Apply_client_configuration/0_setup.sh
+
26
−
20
View file @
e275f5ce
#!/bin/bash
#!/bin/bash
source
/root/envsetup/global-conf.sh
source
/root/envsetup/global-conf.sh
echo
-e
"
echo
-e
"
${
RED
}
Customer parameters will be applied after rebooting. Note that you won't be able to login to the machine after this operation !
${
NC
}
"
${
RED
}
Customer parameters will be applied after rebooting. Note that you won't be able to login to the machine after this operation !
${
NC
}
"
# set customer IP (/etc/network/interfaces)
# set customer IP (/etc/network/interfaces)
sed
-i
"s@192
\.
168
\.
40
\.
10.*@
${
NETWORK_IP
}
@"
/etc/network/interfaces
if
(
!
test
-z
${
NETWORK_IP
}
)
;
then
sed
-i
"s@255
\.
255
\.
252
\.
.*@
${
NETWORK_MASK
}
@"
/etc/network/interfaces
sed
-i
"s@192
\.
168
\.
40
\.
10.*@
${
NETWORK_IP
}
@"
/etc/network/interfaces
sed
-i
"s@192
\.
168
\.
40
\.
.*@
${
NETWORK_GATEWAY
}
@"
/etc/network/interfaces
fi
if
(
!
test
-z
${
NETWORK_MASK
}
)
;
then
sed
-i
"s@255
\.
255
\.
252
\.
.*@
${
NETWORK_MASK
}
@"
/etc/network/interfaces
fi
if
(
!
test
-z
${
NETWORK_GATEWAY
}
)
;
then
sed
-i
"s@192
\.
168
\.
40
\.
.*@
${
NETWORK_GATEWAY
}
@"
/etc/network/interfaces
fi
# backup-server specific
# backup-server specific
if
(
test
-f
/usr/sbin/burp
)
if
(
test
-f
/usr/sbin/burp
)
;
then
then
# changer burp status IP
# changer burp status IP
sed
-i
"s@^BURP_CLIENT_MAIL_DEST=.*@BURP_CLIENT_MAIL_DEST=
${
BURP_CLIENT_MAIL_DEST
}
@"
/root/burp-custom.sh
sed
-i
"s@^BURP_CLIENT_MAIL_DEST=.*@BURP_CLIENT_MAIL_DEST=
${
BURP_CLIENT_MAIL_DEST
}
@"
/root/burp-custom.sh
sed
-i
"s@admin: .*@admin:
${
BURP_CLIENT_MAIL_DEST
}
"
/etc/aliases
sed
-i
"s@admin: .*@admin:
${
BURP_CLIENT_MAIL_DEST
}
"
/etc/aliases
newaliases
newaliases
fi
fi
# set customer DNS
# set customer DNS
echo
"nameserver
${
NETWORK_DNS1
}
"
>
/etc/resolv.conf
if
(
!
test
-z
${
NETWORK_DNS1
}
)
;
then
echo
"nameserver
${
NETWORK_DNS2
}
"
>>
/etc/resolv.conf
echo
"nameserver
${
NETWORK_DNS1
}
"
>
/etc/resolv.conf
if
(
!
test
-z
${
NETWORK_DNS2
}
)
;
then
echo
"nameserver
${
NETWORK_DNS2
}
"
>>
/etc/resolv.conf
fi
fi
# set customer NTP
# set customer NTP
sed
-i
"s@^server .*@@"
/etc/ntp.conf
sed
-i
"s@^server .*@@"
/etc/ntp.conf
echo
""
>>
/etc/ntp.conf
echo
""
>>
/etc/ntp.conf
if
(
!
test
-z
${
NTP_SERVER
}
)
if
(
!
test
-z
${
NTP_SERVER
}
)
;
then
then
echo
"server
${
NTP_SERVER
}
"
>>
/etc/ntp.conf
echo
"server
${
NTP_SERVER
}
"
>>
/etc/ntp.conf
fi
fi
service ntp restart
service ntp restart
# set email sender
# set email sender
if
(
!
test
-z
${
EMAIL_SENDER
}
)
if
(
!
test
-z
${
EMAIL_SENDER
}
)
;
then
then
echo
"#DEFAULT_FROM_EMAIL = '
${
EMAIL_SENDER
}
'"
>>
/etc/mediaserver/msconf.py
echo
"#DEFAULT_FROM_EMAIL = '
${
EMAIL_SENDER
}
'"
>>
/etc/mediaserver/msconf.py
echo
"#DEFAULT_FROM_EMAIL = '
${
EMAIL_SENDER
}
'"
>>
/home/skyreach/htdocs/skyreach_site/settings_override.py
echo
"#DEFAULT_FROM_EMAIL = '
${
EMAIL_SENDER
}
'"
>>
/home/skyreach/htdocs/skyreach_site/settings_override.py
fi
fi
# set locale
# set locale
...
...
This diff is collapsed.
Click to expand it.
global-conf.sh
+
6
−
6
View file @
e275f5ce
...
@@ -74,13 +74,13 @@ CELERITY_WORKER_IP='127.0.1.1'
...
@@ -74,13 +74,13 @@ CELERITY_WORKER_IP='127.0.1.1'
# -- Network configuration --
# -- Network configuration --
# applied with envsetup-launcher.sh client
# applied with envsetup-launcher.sh client
NETWORK_IP
=
0
NETWORK_IP
=
NETWORK_DNS1
=
0
NETWORK_DNS1
=
NETWORK_DNS2
=
0
NETWORK_DNS2
=
NETWORK_MASK
=
0
NETWORK_MASK
=
NETWORK_GATEWAY
=
0
NETWORK_GATEWAY
=
# define this if IP is NATed
# define this if IP is NATed
NETWORK_IP_NAT
=
0
NETWORK_IP_NAT
=
# proxy
# proxy
PROXY_HTTP
=
PROXY_HTTP
=
PROXY_HTTPS
=
PROXY_HTTPS
=
...
...
This diff is collapsed.
Click to expand it.
tests/test_dns_records.py
+
1
−
1
View file @
e275f5ce
...
@@ -68,7 +68,7 @@ if os.path.isfile('../utils.py'):
...
@@ -68,7 +68,7 @@ if os.path.isfile('../utils.py'):
)
)
for
conf_resolver_key
in
conf_resolvers_keys
:
for
conf_resolver_key
in
conf_resolvers_keys
:
conf_resolver
=
conf
.
get
(
conf_resolver_key
)
conf_resolver
=
conf
.
get
(
conf_resolver_key
)
if
conf_resolver
!=
'
0
'
and
conf_resolver
not
in
resolvers
:
if
conf_resolver
and
conf_resolver
!=
'
0
'
and
conf_resolver
not
in
resolvers
:
print
(
'
Resolver %s not configured on the system
'
%
conf_resolver
)
print
(
'
Resolver %s not configured on the system
'
%
conf_resolver
)
all_ok
=
False
all_ok
=
False
...
...
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