blob: 0b8f04b218a157298e70f9928c41c03513d637b3 (
plain)
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
|
#!/bin/bash
set -eu
cat > /etc/systemd/system/firstboot-wootaler.service <<EOF
[Unit]
After=mariadb.service network-online.target
Wants=network-online.target
Description="Logic to install WordPress, WooCommerce and Taler extension on first boot"
[Service]
ExecStart=/usr/local/bin/firstboot-script.sh
[Install]
WantedBy=default.target
EOF
cat > /usr/local/bin/firstboot-script.sh <<EOF
#!/bin/bash
set -eu
echo "## Launching WooCommerce-Taler installation ##"
cd /tmp
git clone git://git.taler.net/woocommerce-taler.git
# Get the necessary scripts
yes | tr y '\n' | woocommerce-taler/server-build/QEMU-autobuild/buildWooTalerServer.sh
yes | tr y '\n' | woocommerce-taler/server-build/QEMU-autobuild/buildWebstore.sh
yes | tr y '\n' | woocommerce-taler/server-build/QEMU-autobuild/buildReclaim.sh
# Clean up
# rm -rf /tmp/woocommerce-taler.git
# Remove self from boot sequence
rm /etc/systemd/system/firstboot-wootaler.service
EOF
chmod +x /usr/local/bin/firstboot-script.sh
echo "Enabling firstboot-wootaler"
systemctl daemon-reload
systemctl enable firstboot-wootaler
echo "wootaler postinstall finished"
|