aboutsummaryrefslogtreecommitdiff
path: root/debian/postinst
diff options
context:
space:
mode:
authorB Stack <bgstack15@gmail.com>2020-12-16 09:49:58 -0500
committerB Stack <bgstack15@gmail.com>2020-12-16 09:49:58 -0500
commita01a0efa69629f5b08f6d425ea09c71d531c60f6 (patch)
tree5b1d9a5c0bc36240be76f7c5fc04cae45d021a73 /debian/postinst
parentadd better debian install notes (diff)
downloadhex-zero-a01a0efa69629f5b08f6d425ea09c71d531c60f6.tar.gz
hex-zero-a01a0efa69629f5b08f6d425ea09c71d531c60f6.tar.bz2
hex-zero-a01a0efa69629f5b08f6d425ea09c71d531c60f6.zip
improve instructions for installing short_url
Diffstat (limited to 'debian/postinst')
-rw-r--r--debian/postinst7
1 files changed, 3 insertions, 4 deletions
diff --git a/debian/postinst b/debian/postinst
index 0e4f748..a1e461a 100644
--- a/debian/postinst
+++ b/debian/postinst
@@ -17,7 +17,7 @@ case "$1" in
adduser --quiet --system --home $HOME \
--disabled-password --group \
--gecos "0x0 system user" \
- ${USERNAME} > ${OUT}
+ ${USERNAME} > ${OUT} 2>&1
fi
chown ${USERNAME}:${USERNAME} \
${HOME} ${HOME}/* \
@@ -25,11 +25,10 @@ case "$1" in
if ! test -r /var/www/hex-zero/db.sqlite || test $( stat -c "%s" /var/www/hex-zero/db.sqlite 2>/dev/null ) -lt 50 ;
then
# detect if short_url exists for the user
- result="$( su ${USERNAME} -c 'echo "import short_url" | python3 1>/dev/null 2>&1 && echo good || echo bad' )"
+ result="$( sh /var/www/hex-zero/check-for-short_url.sh 1>/dev/null 2>&1 && echo good || echo bad )"
if test "${result}" = "bad" ;
then
- echo "Please install python3 module short_url for user ${USERNAME}, and re-run \`sudo dpkg-reconfigure hex-zero\` Using the following command would work."
- echo " sudo su ${USERNAME} -c 'pip3 install --user short_url'"
+ echo "Please install python3 module short_url with \`/usr/libexec/hex-zero/install-short_url-for-hex-zero.sh\` and then dpkg-reconfigure hex-zero."
else
echo "Initializing sqlite database for hex-zero"
su ${USERNAME} -c 'cd /var/www/hex-zero ; /var/www/hex-zero/hex_zero.py db init' 2>/dev/null || :
bgstack15