fix installer and rename file
This commit is contained in:
1 parent
068899798e
commit
c94ae3df7f
2 files changed
+233
-3
No files matched your search
+10
-3
@@ -66,8 +66,15 @@ mkdir -p static
|
||||
# Copy logo if it exists in repo, otherwise you'll need to add it
|
||||
# cp path/to/trbc-logo-full.png static/ # Uncomment and adjust if needed
|
||||
|
||||
# Get the current user (fallback to ubuntu if not detected)
|
||||
CURRENT_USER=${USER:-ubuntu}
|
||||
# Get the actual user who invoked sudo (not root)
|
||||
if [ -n "$SUDO_USER" ]; then
|
||||
CURRENT_USER=$SUDO_USER
|
||||
elif [ -n "$LOGNAME" ] && [ "$LOGNAME" != "root" ]; then
|
||||
CURRENT_USER=$LOGNAME
|
||||
else
|
||||
CURRENT_USER=ubuntu
|
||||
fi
|
||||
|
||||
echo "Installing for user: $CURRENT_USER"
|
||||
|
||||
# Create systemd service file
|
||||
@@ -87,7 +94,7 @@ Environment="CLIENT_ID=YOUR_MICROSOFT_ENTRA_CLIENT_ID"
|
||||
Environment="CLIENT_SECRET=YOUR_MICROSOFT_ENTRA_CLIENT_SECRET"
|
||||
Environment="ADMIN_USERNAME=trbcit"
|
||||
Environment="ADMIN_PASSWORD=CHANGE_THIS_PASSWORD"
|
||||
ExecStart=/home/ubuntu/pdf-rename-sort/venv/bin/gunicorn --bind 127.0.0.1:3000 pdf_renamer:app
|
||||
ExecStart=/home/$CURRENT_USER/pdf-rename-sort/venv/bin/gunicorn --bind 127.0.0.1:3000 pdf_renamer:app
|
||||
Restart=always
|
||||
|
||||
[Install]
|
||||
|
||||
Reference in new issue
Block a user