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
611db589
Commit
611db589
authored
8 years ago
by
Stéphane Diemer
Browse files
Options
Downloads
Patches
Plain Diff
Do not add skyreach repository if no API key is set.
parent
3db4751a
No related branches found
Branches containing commit
No related tags found
No related merge requests found
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
21.Initialize_configuration_file/0_setup.sh
+9
-7
9 additions, 7 deletions
21.Initialize_configuration_file/0_setup.sh
23.Initialize_APT/0_setup.sh
+11
-7
11 additions, 7 deletions
23.Initialize_APT/0_setup.sh
default-conf.sh
+1
-1
1 addition, 1 deletion
default-conf.sh
with
21 additions
and
15 deletions
21.Initialize_configuration_file/0_setup.sh
+
9
−
7
View file @
611db589
...
@@ -2,13 +2,15 @@
...
@@ -2,13 +2,15 @@
source
/root/envsetup/conf.sh
source
/root/envsetup/conf.sh
# Download config file from skyreach
# Download config file from skyreach
conf_url
=
"https://
$SKYREACH_HOST
/erp/credentials/
$SKYREACH_API_KEY
/conf.sh"
if
(
!
test
-z
${
SKYREACH_API_KEY
}
)
;
then
if
(
curl
-I
"
$conf_url
"
>
/dev/null
)
;
then
conf_url
=
"https://
$SKYREACH_HOST
/erp/credentials/
$SKYREACH_API_KEY
/conf.sh"
wget
-q
"
$conf_url
"
-O
/root/envsetup/conf.sh
if
(
curl
-I
"
$conf_url
"
>
/dev/null
)
;
then
source
/root/envsetup/conf.sh
wget
-q
"
$conf_url
"
-O
/root/envsetup/conf.sh
else
source
/root/envsetup/conf.sh
echo
"Failed to download configuration using url:"
else
echo
"
$conf_url
"
echo
"Failed to download configuration using url:"
echo
"
$conf_url
"
fi
fi
fi
# Autogenerate missing values
# Autogenerate missing values
...
...
This diff is collapsed.
Click to expand it.
23.Initialize_APT/0_setup.sh
+
11
−
7
View file @
611db589
...
@@ -22,16 +22,20 @@ apt-get install -y aptitude apt-transport-https
...
@@ -22,16 +22,20 @@ apt-get install -y aptitude apt-transport-https
#apt-get dist-upgrade -y
#apt-get dist-upgrade -y
# modify sources.list to use ubicast cache
# modify sources.list to use ubicast cache
if
(
!
grep
"
${
APT_CACHE_HOST
}
"
/etc/apt/sources.list
>
/dev/null
)
;
then
if
(
!
test
-z
${
APT_CACHE_HOST
}
)
;
then
echo
"Updating sources.list to use cache
${
APT_CACHE_HOST
}
."
if
(
!
grep
"
${
APT_CACHE_HOST
}
"
/etc/apt/sources.list
>
/dev/null
)
;
then
sed
-i
"s@http://@http://
${
APT_CACHE_HOST
}
/@"
/etc/apt/sources.list
echo
"Updating sources.list to use cache
${
APT_CACHE_HOST
}
."
sed
-i
"s@http://@http://
${
APT_CACHE_HOST
}
/@"
/etc/apt/sources.list
fi
fi
fi
# APT panel
# APT panel
echo
"Adding skyreach.list to APT sources."
if
(
!
test
-z
${
SKYREACH_API_KEY
}
)
;
then
wget
-q
"https://
${
SKYREACH_HOST
}
/media/public.gpg"
-O-
|
sudo
apt-key add -
echo
"Adding skyreach.list to APT sources."
echo
"deb https://
${
SKYREACH_HOST
}
packaging/apt/
${
SKYREACH_API_KEY
}
/"
>
/etc/apt/sources.list.d/skyreach.list
wget
-q
"https://
${
SKYREACH_HOST
}
/media/public.gpg"
-O-
|
sudo
apt-key add -
apt-get update
echo
"deb https://
${
SKYREACH_HOST
}
packaging/apt/
${
SKYREACH_API_KEY
}
/"
>
/etc/apt/sources.list.d/skyreach.list
apt-get update
fi
# unattended-upgrades
# unattended-upgrades
echo
"Installing and configuring unattended-upgrades."
echo
"Installing and configuring unattended-upgrades."
...
...
This diff is collapsed.
Click to expand it.
default-conf.sh
+
1
−
1
View file @
611db589
...
@@ -12,7 +12,7 @@ NC='\033[0m'
...
@@ -12,7 +12,7 @@ NC='\033[0m'
# -- System --
# -- System --
# Skyreach in which system looks for packages
# Skyreach in which system looks for packages
SKYREACH_HOST
=
'panel.ubicast.eu'
SKYREACH_HOST
=
'panel.ubicast.eu'
SKYREACH_API_KEY
=
'sde6b2af8d9feb2153d82e8183aa26a5'
SKYREACH_API_KEY
=
# NTP
# NTP
NTP_SERVER1
=
'ntp.ubuntu.com'
NTP_SERVER1
=
'ntp.ubuntu.com'
NTP_SERVER2
=
NTP_SERVER2
=
...
...
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