forked from hernandito/Apache-LetsEncrypt
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathfirstrun.sh
33 lines (21 loc) · 791 Bytes
/
firstrun.sh
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
#!/bin/bash
export HOME="/root"
export PATH="${PATH}:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin"
if [[ $(cat /etc/timezone) != $TZ ]] ; then
echo "Setting the correct time"
echo "$TZ" > /etc/timezone
dpkg-reconfigure -f noninteractive tzdata
sed -i -e "s#;date.timezone.*#date.timezone = ${TZ}#g" /etc/php5/fpm/php.ini
sed -i -e "s#;date.timezone.*#date.timezone = ${TZ}#g" /etc/php5/cli/php.ini
fi
#ln -s /root/userscript.sh /config/userscript.sh
cp /root/userscript.sh /config/userscript.sh
#chmod +x /config/userscript.sh
./config/userscript.sh
#if [ ! -f /root/userscript.sh ]; then
# mv /root/userscript.sh /config/userscript.sh
# mv /root/crons.conf /config/crons.conf
# bash /config/userscript.sh
#fi
#crontab /config/crons.conf
#crontab -l