aboutsummaryrefslogtreecommitdiff
path: root/guix-container.sh
diff options
context:
space:
mode:
Diffstat (limited to 'guix-container.sh')
-rwxr-xr-xguix-container.sh16
1 files changed, 7 insertions, 9 deletions
diff --git a/guix-container.sh b/guix-container.sh
index 064d4c9..afede73 100755
--- a/guix-container.sh
+++ b/guix-container.sh
@@ -26,22 +26,18 @@ fi
PIDFILE=/run/guix-container.pid
EXECUTABLE=/usr/local/bin/guix-container
-WWW_DIR=/var/www
-LOG_DIR=/var/log/guix-container
-ETC_DIR=/etc/guix-container
+HOST_SYSTEM_ROOT=
MAX_CONTAINER_SPINUP_WAIT=60
ACTION="$1"
shift
OPTIND=1
-while getopts p:e:w:l:t:s: OPTION_LETTER ; do
+while getopts p:e:r:s: OPTION_LETTER ; do
case "$OPTION_LETTER" in
p) PIDFILE="$OPTARG" ;;
e) EXECUTABLE="$OPTARG" ;;
- w) WWW_DIR="$OPTARG" ;;
- l) LOG_DIR="$OPTARG" ;;
- t) ETC_DIR="$OPTARG" ;;
+ r) HOST_SYSTEM_ROOT="$OPTARG" ;;
s) MAX_CONTAINER_SPINUP_WAIT="$OPTARG" ;;
esac
done
@@ -83,9 +79,11 @@ onexit() {
}
start() {
- KOSZKO_SIDELOAD_REAL="$WWW_DIR"/koszko.org/html
+ LOG_DIR="$HOST_SYSTEM_ROOT"/var/log/guix-container
+
+ KOSZKO_SIDELOAD_REAL="$HOST_SYSTEM_ROOT"/var/www/koszko.org/html
LOG_REAL="$LOG_DIR"/container
- ETC_REAL="$ETC_DIR"
+ ETC_REAL="$HOST_SYSTEM_ROOT"/etc/guix-container
HTTP_DIR_SHARE_OPT=--share="$KOSZKO_SIDELOAD_REAL"=/srv/http/koszko.org
LOG_DIR_SHARE_OPT=--share="$LOG_REAL"=/var/log