wuut
This commit is contained in:
+1
-1
@@ -21,7 +21,7 @@ send_discord_webhook() {
|
|||||||
|
|
||||||
while true; do #infinite loop
|
while true; do #infinite loop
|
||||||
# scan for those vendor ids
|
# scan for those vendor ids
|
||||||
blescan=$(eval "bluetoothctl -t 10 scan on | awk '{print \$3}' | grep ${vendor_ids[@]/#/-e }")
|
blescan=$(eval "bluetoothctl -t 10 scan on | awk '{print \$3}' | grep \"'${vendor_ids[@]/#/-e }'\")"
|
||||||
if [ -n "$blescan" ]; then
|
if [ -n "$blescan" ]; then
|
||||||
# LE detected poweroff to cryptdisk and notify
|
# LE detected poweroff to cryptdisk and notify
|
||||||
# alert spammmm
|
# alert spammmm
|
||||||
|
|||||||
+23
-17
@@ -1,47 +1,53 @@
|
|||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
|
webhook_file=/usr/share/DREAMMAKER/.discord_url
|
||||||
|
tag_file=/usr/share/DREAMMAKER/.discord_tag
|
||||||
|
script_file=/usr/local/bin/DREAMMAKER.sh
|
||||||
|
service_file=/etc/systemd/system/DREAMMAKER.service
|
||||||
|
store_path=/usr/share/DREAMMAKER
|
||||||
|
|
||||||
echo "installing [DЯΣΛMMΛKΣЯ]"
|
echo "installing [DЯΣΛMMΛKΣЯ]"
|
||||||
# kill any running instanes
|
# kill any running instanes
|
||||||
echo "killing any running"
|
echo "killing any running"
|
||||||
sudo systemctl stop dreammaker.service 2>/dev/null
|
sudo systemctl stop DREAMMAKER.service 2>/dev/null
|
||||||
|
|
||||||
echo "cleaning up"
|
echo "cleaning up"
|
||||||
# see if wer need top nuke old filews
|
# see if wer need top nuke old filews
|
||||||
if [ -f /usr/local/bin/dreammaker.sh ]; then
|
if [ -f $script_file ]; then
|
||||||
sudo rm /usr/local/bin/dreammaker.sh 2>/dev/null
|
sudo rm $script_file 2>/dev/null
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [ -f /etc/systemd/system/dreammaker.service ]; then
|
if [ -f $service_file ]; then
|
||||||
sudo rm /etc/systemd/system/dreammaker.service 2>/dev/null
|
sudo rm $service_file 2>/dev/null
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [ ! -d /usr/share/DREAMMAKER ]; then
|
if [ ! -d $store_path ]; then
|
||||||
echo "Creating /usr/share/DREAMMAKER"
|
echo "Creating $store_path"
|
||||||
sudo mkdir -p /usr/share/DREAMMAKER
|
sudo mkdir -p $store_path
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [ ! -f /usr/share/DREAMMAKER/.discord_url ]; then
|
if [ ! -f $discord_file ]; then
|
||||||
echo -e "Enter Discord Webhook URL\n\tRight click on server->server settings->integrations"
|
echo -e "Enter Discord Webhook URL\n\tRight click on server->server settings->integrations"
|
||||||
read discord_file
|
read discord_file
|
||||||
sudo bash -c "echo \"$discord_file\" > /usr/share/DREAMMAKER/.discord_url"
|
sudo bash -c "echo \"$discord_file\" > $webhook_file"
|
||||||
echo
|
echo
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [ ! -f /usr/share/DREAMMAKER/.discord_tag ]; then
|
if [ ! -f $discord_tag ]; then
|
||||||
echo -e "Enter Discord Member group to tag\n\tuse a backslash when tagging the roll like \\@notifications"
|
echo -e "Enter Discord Member group to tag\n\tuse a backslash when tagging the roll like \\@notifications"
|
||||||
read discord_tag_file
|
read discord_tag_file
|
||||||
sudo bash -c "echo \"$discord_tag_file\" > /usr/share/DREAMMAKER/.discord_tag"
|
sudo bash -c "echo \"$discord_tag_file\" > $tag_file"
|
||||||
echo
|
echo
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# install itt
|
# install itt
|
||||||
echo "installing service"
|
echo "installing service"
|
||||||
sudo cp dreammaker.sh /usr/local/bin/dreammaker.sh
|
sudo cp DREAMMAKER.sh $script_file
|
||||||
sudo chmod +x /usr/local/bin/dreammaker.sh
|
sudo chmod +x $script_file
|
||||||
sudo cp dreammaker.service /etc/systemd/system/dreammaker.service
|
sudo cp DREAMMAKER.service $service_file
|
||||||
|
|
||||||
# enable it at boot and run
|
# enable it at boot and run
|
||||||
echo "enabling [DЯΣΛMMΛKΣЯ] at boot and starting the service"
|
echo "enabling [DЯΣΛMMΛKΣЯ] at boot and starting the service"
|
||||||
sudo systemctl enable dreammaker.service
|
sudo systemctl enable DREAMMAKER.service
|
||||||
sudo systemctl start dreammaker.service
|
sudo systemctl start DREAMMAKER.service
|
||||||
|
|
||||||
echo -e "\nall donesies :3 nytaa~\n"
|
echo -e "\nall donesies :3 nytaa~\n"
|
||||||
|
|||||||
Reference in New Issue
Block a user