From 5be4eff6bf8739ce613921886c3dddb4088d03fb Mon Sep 17 00:00:00 2001 From: Kyle Kaminski Date: Wed, 27 Aug 2014 18:40:08 -0500 Subject: document LAMP stack on archlinux fused to macosx's partition --- systemd-local-cmds/etc/systemd/system/local.service | 13 +++++++++++++ systemd-local-cmds/etc/systemd/system/mysqld.service | 18 ++++++++++++++++++ systemd-local-cmds/mysqld.service | 18 ++++++++++++++++++ systemd-local-cmds/notes.txt | 2 ++ systemd-local-cmds/usr/bin/local.sh | 4 ++++ 5 files changed, 55 insertions(+) create mode 100644 systemd-local-cmds/etc/systemd/system/local.service create mode 100644 systemd-local-cmds/etc/systemd/system/mysqld.service create mode 100644 systemd-local-cmds/mysqld.service create mode 100644 systemd-local-cmds/notes.txt create mode 100755 systemd-local-cmds/usr/bin/local.sh (limited to 'systemd-local-cmds') diff --git a/systemd-local-cmds/etc/systemd/system/local.service b/systemd-local-cmds/etc/systemd/system/local.service new file mode 100644 index 0000000..bf4fba0 --- /dev/null +++ b/systemd-local-cmds/etc/systemd/system/local.service @@ -0,0 +1,13 @@ +[Unit] +Description=Run local commands after boot +ConditionFileIsExecutable=/usr/bin/local.sh + +[Service] +Type=oneshot +# below is needed otherwise ExecStop would execute right after start and unmount +RemainAfterExit=Yes +ExecStart=/usr/bin/local.sh +ExecStop=/usr/bin/umount /mnt/mac-bind + +[Install] +WantedBy=multi-user.target diff --git a/systemd-local-cmds/etc/systemd/system/mysqld.service b/systemd-local-cmds/etc/systemd/system/mysqld.service new file mode 100644 index 0000000..c1f8d3b --- /dev/null +++ b/systemd-local-cmds/etc/systemd/system/mysqld.service @@ -0,0 +1,18 @@ +[Unit] +Description=MariaDB database server +After=syslog.target +Requires=local.service +After=local.service + +[Service] +User=mysql +Group=mysql + +ExecStart=/usr/bin/mysqld --pid-file=/run/mysqld/mysqld.pid --datadir=/home/kyle/dev/mysql +ExecStartPost=/usr/bin/mysqld-post + +Restart=always +PrivateTmp=true + +[Install] +WantedBy=multi-user.target diff --git a/systemd-local-cmds/mysqld.service b/systemd-local-cmds/mysqld.service new file mode 100644 index 0000000..c1f8d3b --- /dev/null +++ b/systemd-local-cmds/mysqld.service @@ -0,0 +1,18 @@ +[Unit] +Description=MariaDB database server +After=syslog.target +Requires=local.service +After=local.service + +[Service] +User=mysql +Group=mysql + +ExecStart=/usr/bin/mysqld --pid-file=/run/mysqld/mysqld.pid --datadir=/home/kyle/dev/mysql +ExecStartPost=/usr/bin/mysqld-post + +Restart=always +PrivateTmp=true + +[Install] +WantedBy=multi-user.target diff --git a/systemd-local-cmds/notes.txt b/systemd-local-cmds/notes.txt new file mode 100644 index 0000000..1cfd4bc --- /dev/null +++ b/systemd-local-cmds/notes.txt @@ -0,0 +1,2 @@ +- what i'm trying to accomplish here is to mount a disk before mysqld starts + and unmount it after mysqld stops diff --git a/systemd-local-cmds/usr/bin/local.sh b/systemd-local-cmds/usr/bin/local.sh new file mode 100755 index 0000000..84941b9 --- /dev/null +++ b/systemd-local-cmds/usr/bin/local.sh @@ -0,0 +1,4 @@ +#!/bin/bash + +/usr/bin/bindfs --map=502/1000:@20/@100,@70/@33 /mnt/mac /mnt/mac-bind + -- cgit v1.2.3