summarylogtreecommitdiffstats
path: root/slurm-llnl-dev.install
diff options
context:
space:
mode:
Diffstat (limited to 'slurm-llnl-dev.install')
-rw-r--r--slurm-llnl-dev.install60
1 files changed, 0 insertions, 60 deletions
diff --git a/slurm-llnl-dev.install b/slurm-llnl-dev.install
deleted file mode 100644
index 98f9615e03eb..000000000000
--- a/slurm-llnl-dev.install
+++ /dev/null
@@ -1,60 +0,0 @@
-post_install() {
- if ! id slurm >&/dev/null; then
- echo "Adding slurm system group..."
- groupadd -g 64030 -r slurm || groupadd -r slurm
-
- echo "Adding slurm system user..."
- useradd -r -c "Slurm Daemon" -d /var/log/slurm-llnl -g slurm -u 64030 slurm || useradd -r -c "Slurm Daemon" -d /var/log/slurm-llnl -g slurm slurm
-
- echo "Locking Slurm User Account..."
- passwd -l slurm &>/dev/null
- fi
-
- # Secure the log dir
- if [ -d /var/log/slurm-llnl ]; then
- chown -R slurm:slurm /var/log/slurm-llnl
- fi
-
- echo "You have to create a slurm configuration-file in /etc/slurm-llnl/ prior to starting any slurm daemons."
-}
-
-post_upgrade() {
- # REMOVE ONEDAY - TODO
- if [[ -f /etc/slurm/slurm.conf ]]; then
- mv /etc/slurm/* /etc/slurm-llnl/
- rmdir /etc/slurm
- echo "Your configuration-files were moved from /etc/slurm to /etc/slurm-llnl !"
- fi
-}
-
-pre_remove() {
- if which systemctl >& /dev/null; then
- echo "Stopping slurm daemons through SystemD..."
- systemctl stop slurmd.service
- systemctl stop slurmdbd.service
- systemctl stop slurmctld.service
-
- echo "Disabling SystemD related file(s)..."
- systemctl disable slurmd.service
- systemctl disable slurmdbd.service
- systemctl disable slurmctld.service
- else
- echo "Stopping slurm daemons..."
- /etc/rc.d/slurm stop
- /etc/rc.d/slurmdbd stop
- fi
-}
-
-post_remove() {
- # Delete remnant recusivly
- rm -rf /var/lib/slurm-llnl
-
- # Change directories which formerly belonged to slurm to be owned by root
- [[ -d /var/spool/slurm ]] && chown -R root:root /var/spool/slurm
- # Notify the user of kept dirs
- [[ -d /etc/slurm-llnl ]] && echo "Custom configuration-file(s) in /etc/slurm-llnl/ were kept on your system."
- [[ -d /var/log/slurm-llnl ]] && chown -R root:root /var/log/slurm-llnl && echo "Logfiles were preserved. They reside under /var/log/slurm-llnl ."
-
- echo "Removing slurm system user/group..."
- userdel slurm
-}