LXC script updates

This commit is contained in:
zzz
2021-07-18 11:56:10 -04:00
parent 891a937411
commit be94e89fad
3 changed files with 18 additions and 3 deletions

View File

@ -13,7 +13,7 @@ do
#sudo sh -c "ls $DIR$i$DIR2/.i2p/netDb/r*/*.dat"
for j in 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16
do
sudo sh -c "cp $DIR$i$DIR2/.i2p/netDb/r*/*.dat $DIR$j$DIR2/.i2p/netDb"
sudo sh -c "cp --preserve=timestamps -u $DIR$i$DIR2/.i2p/netDb/r*/*.dat $DIR$j$DIR2/.i2p/netDb"
sudo sh -c "chown lxcuser $DIR$j$DIR2/.i2p/netDb/*.dat"
done
done

View File

@ -10,6 +10,6 @@ ALL="1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16"
ARG=${@:-$ALL}
for i in $ARG
do
echo "copying i2pupdate.zip to $DIR$i$DIR2$1"
sudo cp i2pupdate.zip $DIR$i$DIR2$1
echo "copying i2pupdate.zip to $DIR$i$DIR2"
sudo cp i2pupdate.zip $DIR$i$DIR2
done

15
lxc/lxcwtf Executable file
View File

@ -0,0 +1,15 @@
#
# tail -f wrapper log in specified container
#
# zzz 4/21 CC0
#
if [ $# -ne 1 ]
then
echo "usage: number"
exit 1
fi
DIR=$HOME/.local/share/lxc/i2p
DIR2=/rootfs/home/ubuntu/.i2p/
cd $DIR$1$DIR2
sudo tail -f `ls -t wrapper.log* | head -n1`