diff options
-rw-r--r-- | alpine-chroot-systemd/alpine.service | 17 | ||||
-rw-r--r-- | alpine-chroot-systemd/soju.service | 16 |
2 files changed, 33 insertions, 0 deletions
diff --git a/alpine-chroot-systemd/alpine.service b/alpine-chroot-systemd/alpine.service new file mode 100644 index 0000000..5460662 --- /dev/null +++ b/alpine-chroot-systemd/alpine.service @@ -0,0 +1,17 @@ +[Unit] +Description=Alpine chroot mounts +Wants=network-online.target +After=network-online.target + +[Service] +Type=oneshot +RemainAfterExit=true +User=root +Group=root +RuntimeDirectory=/alpine +ExecStart=/root/rxchroot/alpine-chroot-activate /alpine +ExecReload=/root/rxchroot/alpine-chroot-activate /alpine +ExecStop=/root/rxchroot/alpine-chroot-deactivate /alpine + +[Install] +WantedBy=multi-user.target diff --git a/alpine-chroot-systemd/soju.service b/alpine-chroot-systemd/soju.service new file mode 100644 index 0000000..ed29c06 --- /dev/null +++ b/alpine-chroot-systemd/soju.service @@ -0,0 +1,16 @@ +[Unit] +Description=soju in an Alpine chroot +Requires=alpine.service +After=alpine.service + +[Service] +Type=simple +User=root +Group=root +# Fix the userspec to match the Alpine UID/GUID +ExecStart=/sbin/chroot --userspec=101:102 /alpine /usr/bin/soju +ExecReload=/bin/kill -HUP $MAINPID +Restart=on-failure + +[Install] +WantedBy=multi-user.target |