Skip to content

Commit

Permalink
cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
whoschek committed Jul 22, 2024
1 parent eb79533 commit 73d6f4c
Showing 1 changed file with 11 additions and 11 deletions.
22 changes: 11 additions & 11 deletions .github/workflows/python-app.yml
Original file line number Diff line number Diff line change
Expand Up @@ -314,20 +314,20 @@ jobs:
echo Now testing as non-root user:
tuser=test
export THOME=/home/$tuser
export thome=/home/$tuser
userdel -r $tuser || true
useradd -d $THOME -m $tuser
useradd -d $thome -m $tuser
echo "$tuser ALL=NOPASSWD:$(command -v zfs),$(command -v zpool)" >> /etc/sudoers
supath=$(grep "^SUPATH=" /etc/default/login | cut -d'=' -f2)
echo "PATH=$supath" >> /etc/default/login # ensure zstd, mbuffer, etc are on the PATH via ssh
mkdir -p $THOME/.ssh
cp -p $HOME/.ssh/id_rsa $HOME/.ssh/id_rsa.pub $THOME/.ssh/
chown -R $tuser $THOME/.ssh
cat $HOME/.ssh/id_rsa.pub | sudo -u $tuser tee -a $THOME/.ssh/authorized_keys > /dev/null
chmod go-rwx $THOME/.ssh/authorized_keys
mkdir -p $thome/.ssh
cp -p $HOME/.ssh/id_rsa $HOME/.ssh/id_rsa.pub $thome/.ssh/
chown -R $tuser $thome/.ssh
cat $HOME/.ssh/id_rsa.pub | sudo -u $tuser tee -a $thome/.ssh/authorized_keys > /dev/null
chmod go-rwx $thome/.ssh/authorized_keys
cp -rp . $THOME/wbackup-zfs # if running with Github Action
# cp -rp wbackup-zfs $THOME/ # if running with https://github.com/vmactions/shell-solaris
chown -R $tuser $THOME/wbackup-zfs
sudo -u $tuser /python3/bin/python3 $THOME/wbackup-zfs/test/test_wbackup_zfs.py
cp -rp . $thome/wbackup-zfs # if running with Github Action
# cp -rp wbackup-zfs $thome/ # if running with https://github.com/vmactions/shell-solaris
chown -R $tuser $thome/wbackup-zfs
sudo -u $tuser /python3/bin/python3 $thome/wbackup-zfs/test/test_wbackup_zfs.py

0 comments on commit 73d6f4c

Please sign in to comment.