yuyu/bin/setup_event_monitor.sh

17 lines
565 B
Bash
Raw Normal View History

2022-03-03 19:35:45 +07:00
#!/bin/bash
2022-03-18 13:04:43 +07:00
SCRIPT_DIR=$( cd -- "$( dirname -- "${BASH_SOURCE[0]}" )" &> /dev/null && pwd )
cd $SCRIPT_DIR || exit
cd ..
2022-03-18 13:13:12 +07:00
echo "Installing Yuyu Event Monitor Service"
2022-03-18 13:04:43 +07:00
yuyu_dir=`pwd -P`
2022-03-03 19:35:45 +07:00
2022-03-18 13:13:12 +07:00
echo "Yuyu dir is $yuyu_dir"
2022-03-03 19:35:45 +07:00
2022-03-18 13:04:43 +07:00
yuyu_dir_sub=${yuyu_dir//\//\\\/}
sed "s/{{yuyu_dir}}/$yuyu_dir_sub/g" "$yuyu_dir"/script/yuyu_event_monitor.service > /etc/systemd/system/yuyu_event_monitor.service
2022-03-03 19:35:45 +07:00
2022-03-18 13:13:12 +07:00
echo "Yuyu Event Monitor Service Installed on /etc/systemd/system/yuyu_event_monitor.service"
echo "Done! you can enable Yuyu Event Monitor with systemctl start yuyu_event_monitor"