Skip to content

Commit 62a5aff

Browse files
committed
update install.sh
1 parent f2671ec commit 62a5aff

File tree

2 files changed

+17
-1
lines changed

2 files changed

+17
-1
lines changed

install.sh

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ fi
5454

5555
# Install the package
5656
echo "Installing PySyslog LFC..."
57-
pip3 install .
57+
pip3 install --system .
5858

5959
# Create necessary directories
6060
echo "Creating system directories..."
@@ -99,6 +99,14 @@ echo "Installing systemd service..."
9999
cp etc/systemd/system/pysyslog.service /etc/systemd/system/
100100
chmod 644 /etc/systemd/system/pysyslog.service
101101

102+
# Ensure the executable is in the system path
103+
echo "Setting up executable..."
104+
if [ -f /usr/local/bin/pysyslog ]; then
105+
cp /usr/local/bin/pysyslog /usr/bin/
106+
chmod 755 /usr/bin/pysyslog
107+
chown root:root /usr/bin/pysyslog
108+
fi
109+
102110
# Reload systemd
103111
echo "Reloading systemd..."
104112
systemctl daemon-reload

uninstall.sh

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,14 @@ else
4545
echo "Log directory not found, skipping..."
4646
fi
4747

48+
# Remove executable if it exists
49+
if [ -f /usr/bin/pysyslog ]; then
50+
echo "Removing executable..."
51+
rm -f /usr/bin/pysyslog
52+
else
53+
echo "Executable not found, skipping..."
54+
fi
55+
4856
# Remove system user and group if they exist
4957
if getent passwd pysyslog >/dev/null; then
5058
echo "Removing system user..."

0 commit comments

Comments
 (0)