Files
DREAMMAKER/install_dreammaker.sh
T
2026-04-23 00:16:47 -06:00

46 lines
1.4 KiB
Bash

#!/bin/bash
echo "installing [DЯΣΛMMΛKΣЯ]"
# kill any running instanes
echo "killing any running"
sudo systemctl stop dreammaker.service 2>/dev/null
echo "cleaning up"
# see if wer need top nuke old filews
if [ -f /usr/local/bin/dreammaker.sh ]; then
sudo rm /usr/local/bin/dreammaker.sh 2>/dev/null
fi
if [ -f /etc/systemd/system/dreammaker.service ]; then
sudo rm /etc/systemd/system/dreammaker.service 2>/dev/null
fi
if [ ! -d /usr/share/DREAMMAKER ]; then
echo "Creating Files"
sudo mkdir -p /usr/share/DREAMMAKER
fi
if [ ! -f /usr/share/DREAMMAKER/.discord_url ]; then
echo -e "Enter Discord Webhook URL\n\tRight click on server->server settings->integrations"
read discord_file
echo "$discord_file" > /usr/share/DREAMMAKER/.discord_url
fi
if [ ! -f /usr/share/DREAMMAKER/.discord_tag ]; then
echo -e "Enter Discord Member group to tag\n\tuse a backslash when tagging the roll like \\@notifications"
read discord_tag_file
echo "$discord_tag_file" > /usr/share/DREAMMAKER/.discord_tag
fi
# install itt
echo "installing service"
sudo cp dreammaker.sh /usr/local/bin/dreammaker.sh
sudo chmod +x /usr/local/bin/dreammaker.sh
sudo cp dreammaker.service /etc/systemd/system/dreammaker.service
# enable it at boot and run
echo "enabling [DЯΣΛMMΛKΣЯ] at boot and starting the service"
sudo systemctl enable dreammaker.service
sudo systemctl start dreammaker.service
echo "all donesies :3"