mirror of
https://github.com/moghtech/komodo.git
synced 2026-04-29 04:10:01 -05:00
1.0.1
This commit is contained in:
27
scripts/setup-periphery.sh
Normal file
27
scripts/setup-periphery.sh
Normal file
@@ -0,0 +1,27 @@
|
||||
#!/bin/bash
|
||||
|
||||
BIN_PATH=$HOME/.monitor/bin
|
||||
mkdir -p $BIN_PATH
|
||||
|
||||
echo "\ndownloading monitor periphery...\n"
|
||||
systemctl --user stop periphery # in case its currently in use
|
||||
curl -L https://github.com/mbecker20/monitor/releases/download/v1.0.0.next/periphery > $BIN_PATH/periphery
|
||||
chmod +x $BIN_PATH/periphery
|
||||
|
||||
# this adds $HOME/.monitor/bin to path
|
||||
if ! grep ".monitor/bin" $HOME/.bashrc > /dev/null; then
|
||||
echo "" >> $HOME/.bashrc
|
||||
echo "export PATH=$HOME/.monitor/bin:\$PATH" >> ~/.bashrc
|
||||
fi
|
||||
|
||||
export PATH="$HOME/.monitor/bin:$PATH"
|
||||
|
||||
if ! test -f "$HOME/.monitor/periphery.config.toml"; then
|
||||
monitor periphery gen-config
|
||||
fi
|
||||
|
||||
if pgrep periphery > /dev/null; then
|
||||
systemctl --user restart periphery
|
||||
else
|
||||
monitor periphery start systemd --yes
|
||||
fi
|
||||
Reference in New Issue
Block a user