Skip to content
Snippets Groups Projects
Commit 468711e6 authored by Jörg Sachse's avatar Jörg Sachse
Browse files

feat: move blockfile to ~/.subapp/ and add contents of blockfile to journal

parent 17b77810
No related branches found
No related tags found
No related merge requests found
......@@ -51,5 +51,5 @@
alias subapp_log='tail -f /var/log/subapp/${HOSTNAME}/subapp.log' # show last log entries in subapp.log
alias subapp_monitor='curl localhost:9001'
alias verify_bag='perl -I /usr/local/lib/ -I /usr/share/perl5/verify_bag.pl'
alias block_subapp='echo "SubApp must not run, startup is blocked manually by an administrator. This file is here for a reason! Only remove it after consultation!" > ~/.BLOCKFILE'
alias unblock_subapp='rm -f ~/.BLOCKFILE'
alias block_subapp='echo "SubApp must not run, startup is blocked manually by an administrator. This file is here for a reason! Only remove it after consultation!" > ~/.subapp/BLOCKFILE'
alias unblock_subapp='rm -f ~/.subapp/BLOCKFILE'
......@@ -8,9 +8,10 @@ Type=forking
Restart=no
Environment="PERL5LIB=/usr/local/perl/"
ExecStartPre=/bin/bash -c '\
BLOCKFILE="/home/{{ vault_subapp_user }}/.BLOCKFILE"; \
BLOCKFILE="/home/{{ vault_subapp_user }}/.subapp/BLOCKFILE"; \
if [[ -e "$BLOCKFILE" ]]; then \
echo "Startup of SubApp is blocked by $BLOCKFILE."; \
cat $BLOCKFILE; \
exit 1; \
fi'
ExecStart=/usr/bin/perl -I /usr/local/perl/ /usr/local/bin/subapp_bagit.pl --config-file {{ vault_subapp_vars.files.subapp.path }} --start
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment