Provision Supervisor worker on Homestead
<p>I am trying to provision a supervisor work via <code>after.sh</code> but for some reason, I keep getting a bunch of permission errors. Anyone have any ideas how I might resolve these?</p>

<p>after.sh</p>

<pre><code># Add the laravel service to supervisor
if [ ! -f /etc/supervisor/conf.d/laravel-worker.conf ]; then

  laravel_worker_block="[program:term-worker]
process_name=%(program_name)s_%(process_num)02d
command=php /home/vagrant/laravel/artisan queue:work sqs-term --sleep=3 --tries=3
autostart=true
autorestart=true
user=vagrant
numprocs=8
redirect_stderr=true
stdout_logfile=/home/vagrant/laravel/term-worker.log

[program:default-worker]
process_name=%(program_name)s_%(process_num)02d
command=php /home/vagrant/laravel/artisan queue:work sqs-default --sleep=3 --tries=3
autostart=true
autorestart=true
user=vagrant
numprocs=8
redirect_stderr=true
stdout_logfile=/home/vagrant/laravel/default-worker.log"

  echo "$laravel_worker_block" &gt; "/etc/supervisor/conf.d/laravel-worker.conf"
  supervisorctl reread
  supervisorctl update

fi
</code></pre>

<p>ERRORS</p>

<pre><code>==&gt; default: /tmp/vagrant-shell: 38: /tmp/vagrant-shell: cannot create /etc/supervisor/conf.d/laravel-worker.conf: Permission denied
==&gt; default: error: &lt;class 'socket.error'&gt;, [Errno 13] Permission denied: file: /usr/lib/python2.7/socket.py line: 228
==&gt; default: error: &lt;class 'socket.error'&gt;, [Errno 13] Permission denied: file: /usr/lib/python2.7/socket.py line: 228
</code></pre>