xonecas.io
8356
Wx

www-xonecas-io / files

www-xonecas-io / login-shell.sh

472 bytes
1#!/bin/sh
2# The login shell make login-shell gives the site's user. git push and clone of <name>.git, and remote,
3# go to the site; everything else (a login, ssh commands, scp, sftp) goes to the user's own shell.
4case $1:$2 in
5-c:"git-receive-pack '"* | -c:"git-upload-pack '"* | -c:remote | -c:"remote "*) exec @SITE@ -c "$2" ;;
6esac
7[ $# -eq 0 ] && exec @SHELL@ -l # a script's $0 never has the login dash, but only a login starts it with no arguments
8exec @SHELL@ "$@"