This commit is contained in:
陆柯 2022-05-12 08:36:11 +08:00
parent 6dff16aeba
commit a63fa75667
2 changed files with 10 additions and 9 deletions

View File

@ -1,6 +1,5 @@
echo '>>>> Starting gitea ...'
cd /faronear/git/gitea
# sudo it so that pm2 list shows it as root
sudo pm2 start -x './gitea' --name gitea -- web
pm2 start -x './gitea' --name gitea -- web
echo '>>>> Started gitea.'

View File

@ -44,13 +44,15 @@ then
popd
mkdir -p $HomePath/.ssh
chmod 700 $HomePath/.ssh
if [ -e $HomePath/.ssh/authorized_keys ]
then
echo "--- Renaming $HomePath/.ssh/authorized_keys to authorized_keys.backup ..."
mv $HomePath/.ssh/authorized_keys $HomePath/.ssh/authorized_keys.backup
fi
echo "--- Linking $SourcePath/authorized_keys to $HomePath/.ssh/authorized_keys ..."
ln -s $SourcePath/authorized_keys $HomePath/.ssh/authorized_keys
echo "--- Adding $SourcePath/authorized_keys to $HomePath/.ssh/authorized_keys ..."
cat $SourcePath/authorized_keys >> $HomePath/.ssh/authorized_keys
# if [ -e $HomePath/.ssh/authorized_keys ]
# then
# echo "--- Renaming $HomePath/.ssh/authorized_keys to authorized_keys.backup ..."
# mv $HomePath/.ssh/authorized_keys $HomePath/.ssh/authorized_keys.backup
# fi
# echo "--- Linking $SourcePath/authorized_keys to $HomePath/.ssh/authorized_keys ..."
# ln -s $SourcePath/authorized_keys $HomePath/.ssh/authorized_keys
else
echo "!!! Not existing $SourcePath or $HomePath, please try again."
fi