forked from blallo/Feedati
23 lines
1 KiB
Bash
23 lines
1 KiB
Bash
|
#!/bin/sh
|
||
|
|
||
|
|
||
|
# thanks https://github.com/neeravkumar/dockerfiles/blob/master/alpine-openrc/Dockerfile
|
||
|
# Tell openrc its running inside a container, till now that has meant LXC
|
||
|
sed -i 's/#rc_sys=""/rc_sys="lxc"/g' /etc/rc.conf
|
||
|
# Tell openrc loopback and net are already there, since docker handles the networking
|
||
|
echo 'rc_provide="loopback net"' >> /etc/rc.conf
|
||
|
# can't get ttys unless you run the container in privileged mode
|
||
|
sed -i '/tty/d' /etc/inittab
|
||
|
# can't set hostname since docker sets it
|
||
|
sed -i '/hostname $opts/d' /etc/init.d/hostname
|
||
|
# can't mount tmpfs since not privileged
|
||
|
sed -i '/mount -t tmpfs/d' /lib/rc/sh/init.sh
|
||
|
# can't do cgroups
|
||
|
sed -i '/cgroup_add_service$/d' /lib/rc/sh/openrc-run.sh
|
||
|
sed -i '/^ntpd/d' /bootstrap/start.sh
|
||
|
echo -e 'log_errors = On\nerror_log = syslog' >> /etc/php7/php.ini
|
||
|
sed -i -r 's@ErrorLog .*@ErrorLog "|/usr/bin/logger -n syslog -T -P 514 -t apacheErr"@i' \
|
||
|
/etc/apache2/httpd.conf
|
||
|
echo 'TransferLog "|/usr/bin/logger -n syslog -T -P 514 -t apacheLog"' \
|
||
|
>> /etc/apache2/httpd.conf
|