fixed install.sh
This commit is contained in:
parent
d40779e97a
commit
fce11134d8
26
install.sh
26
install.sh
@ -3,7 +3,6 @@ set -e
|
||||
|
||||
# Git repository configuration
|
||||
GIT_REPO="http://192.168.0.236:3000/masterdraco/torrent"
|
||||
REPO_CREDENTIALS="masterdraco:mlvfnj78"
|
||||
|
||||
# Check root privileges
|
||||
if [ "$EUID" -ne 0 ]; then
|
||||
@ -31,6 +30,10 @@ for pkg in "${!PKGS[@]}"; do
|
||||
fi
|
||||
done
|
||||
|
||||
# Get files from Repo
|
||||
git pull http://192.168.0.236:3000/masterdraco/torrent.git
|
||||
|
||||
|
||||
# Create directory structure
|
||||
echo "Creating directory structure..."
|
||||
mkdir -p /etc/torrent
|
||||
@ -47,24 +50,3 @@ echo "Setting permissions..."
|
||||
chmod 600 /etc/torrent/mover.conf
|
||||
chown root:root /etc/torrent/mover.conf
|
||||
|
||||
# Initialize Git repository
|
||||
if [ ! -d .git ]; then
|
||||
echo "Initializing Git repository..."
|
||||
git init
|
||||
git config user.name "torrent-mover-installer"
|
||||
git config user.email "installer@localhost"
|
||||
git remote add origin "http://$REPO_CREDENTIALS@192.168.0.236:3000/masterdraco/torrent.git"
|
||||
fi
|
||||
|
||||
# Add files to Git
|
||||
git add .
|
||||
git commit -m "Initial installation commit" || true
|
||||
|
||||
# Push to remote repository
|
||||
echo "Pushing to Git repository..."
|
||||
git push -u origin master
|
||||
|
||||
echo ""
|
||||
echo "Installation complete!"
|
||||
echo "Configuration file: /etc/torrent/mover.conf"
|
||||
echo "Main script: /usr/local/bin/torrent-mover"
|
||||
|
Loading…
x
Reference in New Issue
Block a user