chiark / gitweb /
Put scripts in `pkgsharedir' rather than `pkglibdir'.
[distorted-keys] / cryptop.in
index 3efb554c693b38f3f124639fc8a604a8393c528a..4858a539ebdb4a3c6163afc6315096517f5eb0ca 100755 (executable)
 set -e
 : ${ETC=@pkgconfdir@}
 : ${KEYS=@pkgstatedir@}
-: ${KEYSLIB=@pkglibdir@}
+: ${KEYSLIB=@pkgdatadir@}
 export ETC KEYS KEYSLIB
 
 . "$KEYSLIB"/keyfunc.sh
 
-usage="usage: $quis COMMAND [ARGUMENTS ...]"
+usage="COMMAND [ARGUMENTS ...]"
 prefix=cryptop
 
-## Fake up caller credentials if not called via userv.
-case "${USERV_USER+t}" in
-  t) ;;
-  *) USERV_USER=${LOGNAME-${USER-$(id -un)}} USERV_UID=$(id -u) ;;
-esac
-case "${USERV_GROUP+t}" in
-  t) ;;
-  *) USERV_GROUP=$(id -Gn) USERV_GID=$(id -gn) ;;
-esac
-export USERV_USER USERV_UID USERV_GROUP USERV_GID
+runas @user@ cryptop "$@"
 
 ## Parse options.
 while getopts "hv" opt; do