Replies: 1 comment
-
That s a very helpful guide !! Thanks ! |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
How I run WA2DC on my Ubuntu server 24.04
#!/bin/bash
Update package index
echo "Updating package index..."
sudo apt-get update -y
Pull Node.js setup for Node.js 18
echo "Setting up Node.js repository..."
curl -fsSL https://deb.nodesource.com/setup_18.x | sudo -E bash -
Install Node.js
echo "Installing Node.js..."
sudo apt-get install -y nodejs
Clone the repository
echo "Cloning the WhatsAppToDiscord repository..."
git clone https://github.com/FKLC/WhatsAppToDiscord
Navigate into the cloned directory
cd WhatsAppToDiscord
Display the Node.js version
echo "Your Node Version:"
node -v
Install required packages/dependencies
echo "Installing dependencies..."
npm install
Run the program
echo "Running the WhatsAppToDiscord program..."
node .
https://raw.githubusercontent.com/Stradios/WhatsAppToDiscord/refs/heads/main/Linux_install_whatsapp_to_discord.sh
i don't remember, i think i run this after i installed it to automate the restart prosers
#!/bin/bash
Name of the screen session
SESSION_NAME="WhatsApp_To_Discord"
Check if the session already exists
if screen -list | grep -q "$SESSION_NAME"; then
# If the session exists, reattach to it
screen -r "$SESSION_NAME"
else
# If the session doesn't exist, create a new one
screen -S "$SESSION_NAME" -d -m bash -c "
cd ~/Downloads/WhatsAppToDiscord/ &&
node ."
echo "Started a new screen session: $SESSION_NAME"
fi
https://raw.githubusercontent.com/Stradios/WhatsAppToDiscord/refs/heads/main/start_whatsapp_to_discord.sh
and after i run cron job
#!/bin/bash
Define the path to your script
SCRIPT_PATH="$HOME/Downloads/WhatsAppToDiscord/start_whatsapp_to_discord.sh"
Check if the cron job already exists
if crontab -l | grep -q "@reboot $SCRIPT_PATH"; then
echo "Cron job already exists."
else
# Add the cron job for running the script at reboot
(crontab -l; echo "@reboot $SCRIPT_PATH") | crontab -
echo "Cron job added to run the script at startup."
fi
https://raw.githubusercontent.com/Stradios/WhatsAppToDiscord/refs/heads/main/setup_autorun.sh
Beta Was this translation helpful? Give feedback.
All reactions