Files
dgtlmoon 4298c52a7e
Build Debian Package / Build and Package changedetection.io (push) Has been cancelled
Publish Python 🐍distribution 📦 to PyPI and TestPyPI / Build distribution 📦 (push) Has been cancelled
ChangeDetection.io Container Build Test / test-container-build (push) Has been cancelled
ChangeDetection.io App Test / lint-code (push) Has been cancelled
Publish Python 🐍distribution 📦 to PyPI and TestPyPI / Test the built 📦 package works basically. (push) Has been cancelled
Publish Python 🐍distribution 📦 to PyPI and TestPyPI / Publish Python 🐍 distribution 📦 to PyPI (push) Has been cancelled
ChangeDetection.io App Test / test-application-3-10 (push) Has been cancelled
ChangeDetection.io App Test / test-application-3-11 (push) Has been cancelled
ChangeDetection.io App Test / test-application-3-12 (push) Has been cancelled
ChangeDetection.io App Test / test-application-3-13 (push) Has been cancelled
initial WIP
2025-11-02 00:34:21 +01:00

52 lines
1.6 KiB
Bash
Executable File

#!/bin/sh
set -e
case "$1" in
configure)
# Create system user if it doesn't exist
if ! getent passwd _changedetection >/dev/null; then
adduser --system --group --home /var/lib/changedetection \
--gecos "changedetection.io service" \
--shell /usr/sbin/nologin \
_changedetection
fi
# Create data directory with proper permissions
if [ ! -d /var/lib/changedetection ]; then
mkdir -p /var/lib/changedetection
fi
chown _changedetection:_changedetection /var/lib/changedetection
chmod 755 /var/lib/changedetection
# Reload systemd and enable service
if [ -d /run/systemd/system ]; then
systemctl daemon-reload >/dev/null || true
deb-systemd-helper enable changedetection.io.service >/dev/null || true
# Start service if this is a fresh install
if [ -z "$2" ]; then
echo "Starting changedetection.io service..."
systemctl start changedetection.io.service || true
echo ""
echo "changedetection.io has been installed and started."
echo "Access it at: http://127.0.0.1:5000"
echo ""
echo "To check status: systemctl status changedetection.io"
echo "To view logs: journalctl -u changedetection.io -f"
fi
fi
;;
abort-upgrade|abort-remove|abort-deconfigure)
;;
*)
echo "postinst called with unknown argument \`$1'" >&2
exit 1
;;
esac
#DEBHELPER#
exit 0