summaryrefslogtreecommitdiff
path: root/community/sage-mathematics/sage-mathematics.install
diff options
context:
space:
mode:
Diffstat (limited to 'community/sage-mathematics/sage-mathematics.install')
-rw-r--r--community/sage-mathematics/sage-mathematics.install19
1 files changed, 14 insertions, 5 deletions
diff --git a/community/sage-mathematics/sage-mathematics.install b/community/sage-mathematics/sage-mathematics.install
index f5c16308e..6caa5299e 100644
--- a/community/sage-mathematics/sage-mathematics.install
+++ b/community/sage-mathematics/sage-mathematics.install
@@ -5,6 +5,9 @@ post_install() {
# the files it writes to ~/.sage can be safely ignored
HOME=/tmp ./sage -c
+ # add sagemath user for the daemon
+ useradd -r -c 'Sage daemon' -d /opt/sage -s /bin/false sagemath
+
# Update LaTeX db to point to SageTeX
if [ -f /usr/bin/texhash ]; then
/usr/bin/texhash /usr/share/texmf
@@ -23,11 +26,14 @@ echo '
\___/ | |_/|/\__/ \_/|/o
/| /|
\| \|
- ___ __ _ __ _ ___
-/ __|/ _` |/ _` |/ _ \
-\__ \ (_| | (_| | __/
-|___/\__,_|\__, |\___|
- |___/
+ ________________________________
+< sage-mathematics, I mean, MOO! >
+ --------------------------------
+ \ ^__^
+ \ (oo)\_______
+ (__)\ )\/\
+ ||----w |
+ || ||
'
}
@@ -42,6 +48,9 @@ post_remove() {
/usr/bin/texhash /usr/share/texmf
fi
+ # remove the sagemath daemon user
+ userdel sagemath
+
# clean up left overs
rm -rf /opt/sage
}