From 713aa16ddffa9c858df686e3068c63da5c047ffe Mon Sep 17 00:00:00 2001 From: lemniskett Date: Sat, 23 Jan 2021 16:15:13 +0700 Subject: [PATCH] Add mount and unmount options. --- README.md | 2 +- archbox.bash | 10 ++++++++++ 2 files changed, 11 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index c507b8a..3704168 100644 --- a/README.md +++ b/README.md @@ -29,7 +29,7 @@ Description=Archbox init PartOf=multi-user.target [Service] -ExecStart=/usr/local/share/archbox/bin/archboxinit start +ExecStart=/bin/archbox --mount Type=oneshot User=root diff --git a/archbox.bash b/archbox.bash index def5d26..17ae16b 100644 --- a/archbox.bash +++ b/archbox.bash @@ -33,6 +33,8 @@ OPTIONS: -c, --create URL Creates a chroot enviroment. -e, --enter Enters chroot enviroment. -h, --help Displays this help message. + -m, --mount Mount Archbox directories. + -u, --umount Unmount Archbox directories. --remount-run Remount /run in chroot enviroment. --mount-runtime-only Mount XDG_RUNTIME_DIR to chroot enviroment. @@ -95,6 +97,14 @@ case $1 in $PRIV $PREFIX/share/archbox/bin/archbox enter exit $? ;; + -m|--mount) + asroot + $PREFIX/share/archbox/bin/archboxinit start + ;; + -u|--umount) + asroot + $PREFIX/share/archbox/bin/archboxinit stop + ;; --remount-run) $PRIV $PREFIX/share/archbox/bin/remount_run exit $?