Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Chown mountpoint at installation, not at login #14

Open
wants to merge 2 commits into
base: main
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions src/shell-history/install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -25,15 +25,13 @@ if [[ -z "\$HISTFILE_OLD" ]]; then
fi
export HISTFILE=/dc/shellhistory/.bash_history
export PROMPT_COMMAND='history -a'
sudo chown -R $_REMOTE_USER /dc/shellhistory
EOF
chown -R $_REMOTE_USER $_REMOTE_USER_HOME/.bashrc

# Set HISTFILE for zsh
cat << EOF >> "$_REMOTE_USER_HOME/.zshrc"
export HISTFILE=/dc/shellhistory/.zsh_history
export PROMPT_COMMAND='history -a'
sudo chown -R $_REMOTE_USER /dc/shellhistory
EOF
chown -R $_REMOTE_USER $_REMOTE_USER_HOME/.zshrc

Expand All @@ -49,6 +47,8 @@ if test -f \$history_location
mv \$history_location "\$history_location-old"
end
ln -s /dc/shellhistory/fish_history \$history_location
sudo chown -R $_REMOTE_USER \$history_location
EOF
chown -R $_REMOTE_USER $_REMOTE_USER_HOME/.config/

mkdir -p /dc/shellhistory
chown -R $_REMOTE_USER /dc/shellhistory