diff --git a/build/before-install.sh b/build/before-install.sh index 114df94..16fd718 100755 --- a/build/before-install.sh +++ b/build/before-install.sh @@ -1 +1,8 @@ getent passwd ztncui || useradd --system --home-dir /opt/key-networks/ztncui --shell /bin/false ztncui +if [ $(getent group zerotier-one) ]; then + echo "Adding user ztncui to group zerotier-one..." + usermod -a -G zerotier-one ztncui + chmod g+r /var/lib/zerotier-one/authtoken.secret +else + echo "Could not add user ztncui to group zerotier-one... is zerotier-one installed?" +fi diff --git a/build/build.sh b/build/build.sh index 0f4d25f..1975f28 100755 --- a/build/build.sh +++ b/build/build.sh @@ -80,6 +80,7 @@ GENERAL_FPM_FLAGS=" --chdir $STAGING_DIR --package $PKG_DIR --directories /opt/key-networks + --depends zerotier-one --before-install before-install.sh --after-install after-install.sh --before-remove before-remove.sh