-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathcustomize
More file actions
executable file
·37 lines (26 loc) · 993 Bytes
/
customize
File metadata and controls
executable file
·37 lines (26 loc) · 993 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
#!/usr/bin/bash
#
# Put customizations to your image in this file.
# Custom versions and variables
PATH=/opt/local/gnu/bin:/opt/local/bin:/opt/local/sbin:/usr/bin:/usr/sbin
SDC_IMGAPI_VERSION='master-20200628T184348Z-g8024717'
# Exit if any commands fail
set -o errexit
# Configuring image specific packages
echo "* Download and extract imgapi"
mkdir -p /opt/imgapi
curl https://smartos.skylime.net/extra/imgapi-pkg-${SDC_IMGAPI_VERSION}.tar.gz | gtar xz -C /opt/imgapi --strip-components=4
echo "* Extract UI"
curl https://smartos.skylime.net/extra/imgapi-ui-${SDC_IMGAPI_VERSION}.tar.gz | gtar xz -C /opt
echo "* Chown everything to www user"
chown -R www:www /opt/imgapi
echo "* Create data folder in root and symlink"
mkdir -p /data
echo "* Create nginx ssl folder"
mkdir -p /opt/local/etc/nginx/ssl
echo "* Cleanup home/admin because of delegate dataset usage"
rm -rf /home/admin/.[^.]*
echo "* Cleaning up."
rm -rf /root/*
# Prepare image for provisioning
sm-prepare-image -y