-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathrun.sh
More file actions
executable file
·40 lines (34 loc) · 1.58 KB
/
run.sh
File metadata and controls
executable file
·40 lines (34 loc) · 1.58 KB
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
#!/bin/sh
# Envirounment variables
# PROXY_PKG= \ # Format: http[s]://<name_or_ip>[:<port>]
# PROXY_HTTP= \ # Format: http[s]://<name_or_ip>[:<port>]
# RCMAIL_USER=roundcube \
# RCMAIL_PASS=roundcube \
# RCMAIL_HOST=db \
# RCMAIL_DB=roundcubemail \
# RCMAIL_CREATEDB=false \
# RCMAIL_IMAP=localhost \ # Format: [imap|imaps|tls|ssl]://<ip_or_name_imap_host>
# RCMAIL_SMTP=localhost \ # Format: [smtp|smtps|tls|ssl]://<ip_or_name_smtp_host>
# RCMAIL_CALENDAR=false\
# PHP_DATEZONE=
#if [ ! $RCMAIL_USER ]
# then export RCMAIL_USER=roundcube
#elif [ ! $RCMAIL_PASS ]
# then export RCMAIL_PASS=roundcube
#elif [ ! $RCMAIL_DB ]
# then export RCMAIL_DB=roundcubemail
#elif [ ! $RCMAIL_HOST ]
# then export RCMAIL_HOST=localhost
#fi
# Adjust database
#sed -i -e "s|roundcube:roundcube@localhost/roundcubemail|$RCMAIL_USER:$RCMAIL_PASS@$RCMAIL_HOST/$RCMAIL_DB|" /var/www/webmail/config/config.inc.php
# Adjust imap and smtp servers
#sed -i -e "s/$config['default_host']\ =\ 'localhost';/$config['default_host']\ =\ '$RCMAIL_IMAP';/" /var/www/webmail/config/config.inc.php
#sed -i -e "s/$config['smtp_server']\ =\ 'localhost';/$config['smtp_server']\ =\ '$RCMAIL_SMTP';/" /var/www/webmail/config/config.inc.php
# Adjust timezone of PHP
#sed -i -e "s/;date.timezone\ =/date.timezone\ =\ $PHP_DATEZONE/" /etc/php5/fpm/php.ini
cd /etc/init.d/
./php7.0-fpm restart && \
./nginx restart
if [ ! -f /var/www/logs/errors ]; then touch /var/www/logs/errors ; chown www-data:www-data /var/www -R ; fi
tail -f /var/www/logs/errors /var/log/nginx/* /var/log/php7.0-fpm.logphp7.0-fpm.log