Switch to Chromium
This commit is contained in:
parent
e9df645b49
commit
d9fc5df080
8 changed files with 24 additions and 154 deletions
27
rootfs/etc/cont-init.d/55-chromium.sh
Executable file
27
rootfs/etc/cont-init.d/55-chromium.sh
Executable file
|
@ -0,0 +1,27 @@
|
|||
#!/bin/sh
|
||||
|
||||
set -e # Exit immediately if a command exits with a non-zero status.
|
||||
set -u # Treat unset variables as an error.
|
||||
|
||||
# Make sure some directories are created.
|
||||
mkdir -p /config/downloads
|
||||
mkdir -p /config/log/chromium
|
||||
|
||||
# Generate machine id.
|
||||
if [ ! -f /config/machine-id ]; then
|
||||
echo "generating machine-id..."
|
||||
cat /proc/sys/kernel/random/uuid | tr -d '-' > /config/machine-id
|
||||
fi
|
||||
|
||||
# Initialize log files.
|
||||
for LOG_FILE in /config/log/chromium/output.log /config/log/chromium/error.log
|
||||
do
|
||||
touch "$LOG_FILE"
|
||||
|
||||
# Make sure the file doesn't grow indefinitely.
|
||||
if [ "$(stat -c %s "$LOG_FILE")" -gt 1048576 ]; then
|
||||
echo > "$LOG_FILE"
|
||||
fi
|
||||
done
|
||||
|
||||
# vim:ft=sh:ts=4:sw=4:et:sts=4
|
Loading…
Add table
Add a link
Reference in a new issue