mirror of
https://github.com/mynodebtc/mynode.git
synced 2024-12-24 13:38:11 +00:00
fix: log2ram can't stop before it's installed
This commit fixes an issue with `setup/setup_device.sh` where log2ram service would try to stop before log2ram was installed. I copied the log2ram logic from `rootfs/standard/usr/bin/mynode_post_upgrade.sh` as it looks like it functions correctly. In the future I think we should add a feature to disable log2ram since it is really only needed when you are running on an sdcard or USB, but that will be for another day.
This commit is contained in:
parent
49e34b8c20
commit
4c9ca9c47d
|
@ -454,18 +454,21 @@ npm install -g yarn
|
|||
|
||||
# Install Log2Ram
|
||||
if [ $IS_RASPI = 1 ] || [ $IS_X86 = 1 ]; then
|
||||
cd /tmp
|
||||
rm -rf log2ram*
|
||||
wget https://github.com/azlux/log2ram/archive/v1.2.2.tar.gz -O log2ram.tar.gz
|
||||
tar -xvf log2ram.tar.gz
|
||||
mv log2ram-* log2ram
|
||||
cd log2ram
|
||||
chmod +x install.sh
|
||||
service log2ram stop
|
||||
./install.sh
|
||||
cd ~
|
||||
if [ ! -f /usr/local/bin/log2ram ]; then
|
||||
cd /tmp
|
||||
rm -rf log2ram* || true
|
||||
wget https://github.com/azlux/log2ram/archive/v1.2.2.tar.gz -O log2ram.tar.gz
|
||||
tar -xvf log2ram.tar.gz
|
||||
mv log2ram-* log2ram
|
||||
cd log2ram
|
||||
chmod +x install.sh
|
||||
service log2ram stop || true
|
||||
./install.sh || true
|
||||
cd ~
|
||||
fi
|
||||
fi
|
||||
|
||||
|
||||
# Remove existing MOTD login info
|
||||
rm -rf /etc/motd
|
||||
rm -rf /etc/update-motd.d/*
|
||||
|
|
Loading…
Reference in New Issue
Block a user