termux-tools: Add a login program
This commit is contained in:
parent
edc3049a03
commit
94d42ba267
19
packages/termux-tools/login
Executable file
19
packages/termux-tools/login
Executable file
@ -0,0 +1,19 @@
|
||||
#!/data/data/com.termux/files/usr/bin/sh
|
||||
|
||||
if [ -f $PREFIX/etc/motd ] && [ ! -f ~/.hushlogin ]; then
|
||||
cat $PREFIX/etc/motd
|
||||
fi
|
||||
|
||||
if [ -G ~/.termux/shell ]; then
|
||||
SHELL="`realpath ~/.termux/shell`"
|
||||
else
|
||||
for file in $PREFIX/bin/bash $PREFIX/bin/sh /system/bin/sh; do
|
||||
if [ -x $file ]; then
|
||||
SHELL=$file
|
||||
break
|
||||
fi
|
||||
done
|
||||
fi
|
||||
|
||||
exec "$SHELL" -l
|
||||
|
Loading…
Reference in New Issue
Block a user