forked from nextcloud/vm
-
Notifications
You must be signed in to change notification settings - Fork 5
/
initial-root.profile
51 lines (41 loc) · 1.22 KB
/
initial-root.profile
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
38
39
40
41
42
43
44
45
46
47
48
49
50
51
# ~/.profile: executed by Bourne-compatible login shells.
if [ "$BASH" ]; then
if [ -f ~/.bashrc ]; then
. ~/.bashrc
fi
fi
mesg n || true
# Resize or use hd
mkdir -p /var/scripts
if [ -f bash /var/scripts/resize-sd.sh ]; then
rm bash /var/scripts/resize-sd.sh
else
wget https://raw.githubusercontent.com/techandme/NextBerry/master/static/resize-sd.sh -P /var/scripts
chmod +x /var/scripts/resize-sd.sh
fi
if [[ $? > 0 ]]
then
echo "Download of scripts failed. System will reboot in 10 seconds..."
sleep 10
reboot
else
clear
fi
bash /var/scripts/resize-sd.sh
# Grab install scripts
mkdir -p /var/scripts
if [ -f /var/scripts/nextcloud_install_production.sh ]; then
rm /var/scripts/nextcloud_install_production.sh
else
wget https://raw.githubusercontent.com/techandme/NextBerry/master/nextcloud_install_production.sh -P /var/scripts
chmod +x /var/scripts/nextcloud_install_production.sh
fi
if [[ $? > 0 ]]
then
echo "Download of scripts failed. System will reboot in 10 seconds..."
sleep 10
reboot
else
clear
fi
bash /var/scripts/nextcloud_install_production.sh