2
0
mirror of https://github.com/frappe/bench.git synced 2024-11-14 01:04:03 +00:00
bench/vm/scripts/restart_supervisor.sh
Ameya Shenoy 357d497e55
restart supervisor on boot
This is being added to restart supervisor inside the virtual machine on
boot, since the command 'bench update' breaks on boot, since the
supervisor is not active. This is a bug in debian, which has been
propogated to ubuntu, and this piece of code can be removed when the bug
is fixed.
2018-03-23 15:04:34 +05:30

14 lines
268 B
Bash

#! /bin/bash
# Write out current crontab
crontab -l > current_cron
# Echo new cron into cron file
echo "@reboot sleep 20 && systemctl restart supervisor" >> current_cron
# Install new cron file
crontab current_cron
# Delete the temporary cron file
rm current_cron