mirror of
https://github.com/DeNNiiInc/UltyScan.git
synced 2026-04-17 18:26:00 +00:00
Update install.sh for single-script install capability
This commit is contained in:
22
install.sh
22
install.sh
@@ -505,6 +505,28 @@ echo 'www-data ALL=(ALL) NOPASSWD: /usr/bin/pkill *' >> /etc/sudoers.d/www-data-
|
|||||||
echo 'www-data ALL=(ALL) NOPASSWD: /usr/bin/rm *' >> /etc/sudoers.d/www-data-sniper
|
echo 'www-data ALL=(ALL) NOPASSWD: /usr/bin/rm *' >> /etc/sudoers.d/www-data-sniper
|
||||||
chmod 440 /etc/sudoers.d/www-data-sniper
|
chmod 440 /etc/sudoers.d/www-data-sniper
|
||||||
|
|
||||||
|
# Configure Git Safe Directory
|
||||||
|
echo -e "$OKBLUE[*]$RESET Configuring Git permissions... $RESET"
|
||||||
|
git config --system --add safe.directory /usr/share/sniper 2>/dev/null
|
||||||
|
git config --global --add safe.directory /usr/share/sniper 2>/dev/null
|
||||||
|
|
||||||
|
# Generate Version File
|
||||||
|
echo -e "$OKBLUE[*]$RESET Generating version information... $RESET"
|
||||||
|
cd $INSTALL_DIR
|
||||||
|
git rev-parse --short HEAD > /var/www/html/ultyscan/.version 2>/dev/null
|
||||||
|
git rev-parse HEAD >> /var/www/html/ultyscan/.version 2>/dev/null
|
||||||
|
git rev-parse --abbrev-ref HEAD >> /var/www/html/ultyscan/.version 2>/dev/null
|
||||||
|
git log -1 --format=%ci >> /var/www/html/ultyscan/.version 2>/dev/null
|
||||||
|
chown www-data:www-data /var/www/html/ultyscan/.version 2>/dev/null
|
||||||
|
|
||||||
|
# Deploy Secrets
|
||||||
|
echo -e "$OKBLUE[*]$RESET Deploying secrets configuration... $RESET"
|
||||||
|
if [ -f "$INSTALL_DIR/secrets.php" ]; then
|
||||||
|
cp $INSTALL_DIR/secrets.php /var/www/html/secrets.php
|
||||||
|
chown www-data:www-data /var/www/html/secrets.php
|
||||||
|
chmod 640 /var/www/html/secrets.php
|
||||||
|
fi
|
||||||
|
|
||||||
# Configure Apache Port 8888
|
# Configure Apache Port 8888
|
||||||
echo -e "$OKBLUE[*]$RESET Configuring Apache on port 8888... $RESET"
|
echo -e "$OKBLUE[*]$RESET Configuring Apache on port 8888... $RESET"
|
||||||
if ! grep -q "Listen 8888" /etc/apache2/ports.conf; then
|
if ! grep -q "Listen 8888" /etc/apache2/ports.conf; then
|
||||||
|
|||||||
Reference in New Issue
Block a user