mirror of
https://github.com/scrapy/scrapy.git
synced 2025-02-23 07:23:40 +00:00
- scrapy: which provides only the library and scrapy-ctl command - scrapy-service: which provides the service, upstart script, system user, etc This allows a clean install of just the library for those which are not interested in the Scrapy service. --HG-- rename : debian/scrapy.dirs => debian/scrapy-service.dirs rename : debian/scrapy.install => debian/scrapy-service.install rename : debian/scrapy.postinst => debian/scrapy-service.postinst rename : debian/scrapy.postrm => debian/scrapy-service.postrm rename : debian/scrapy.upstart => debian/scrapy-service.upstart rename : debian/conf/service_conf.py => debian/service_conf.py
35 lines
719 B
Bash
35 lines
719 B
Bash
#!/bin/sh
|
|
|
|
set -e
|
|
|
|
case "$1" in
|
|
configure)
|
|
# Create user to run the service as
|
|
if [ -z "`id -u scrapy 2> /dev/null`" ]; then
|
|
adduser --system --home /var/lib/scrapy --gecos "scrapy" \
|
|
--no-create-home --disabled-password \
|
|
--quiet scrapy || true
|
|
fi
|
|
if [ ! -d /var/run/scrapy ]; then
|
|
mkdir /var/run/scrapy
|
|
chown scrapy:nogroup /var/run/scrapy
|
|
fi
|
|
|
|
chown scrapy:nogroup /var/log/scrapy /var/lib/scrapy /var/run/scrapy
|
|
;;
|
|
|
|
abort-upgrade|abort-remove|abort-deconfigure)
|
|
;;
|
|
|
|
*)
|
|
echo "postinst called with unknown argument \`$1'" >&2
|
|
exit 1
|
|
;;
|
|
esac
|
|
|
|
#DEBHELPER#
|
|
|
|
exit 0
|
|
|
|
|