Note: This is an update of Will Haley's excellent post to use APFS instead of CoreStorage.
I'll add to Will's warning below that this is a complex process on MacOS because the OS has a lot of assumptions on where things are. I
``` | |
$ cat /root/autoshutdown.sh | |
#!/bin/bash | |
qm list | grep running | |
if [ $? -eq 1 ] | |
then | |
shutdown -h now | |
fi | |
``` |
Note: This is an update of Will Haley's excellent post to use APFS instead of CoreStorage.
I'll add to Will's warning below that this is a complex process on MacOS because the OS has a lot of assumptions on where things are. I
<?xml version="1.0" encoding="UTF-8"?> | |
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> | |
<plist version="1.0"> | |
<dict> | |
<key>Disabled</key> | |
<false/> | |
<key>Label</key> | |
<string>gerbera.io</string> | |
<key>ProgramArguments</key> | |
<array> |
from .base import * | |
# WEB SITE URL | |
THIS_BOOKTYPE_SERVER = '85.214.38.3' | |
BOOKTYPE_URL = 'http://85.214.38.3' | |
# BOOKTYPE_URL = 'http://{}'.format(THIS_BOOKTYPE_SERVER) | |
STATIC_URL = '{}/static/'.format(BOOKTYPE_URL) | |
DATA_URL = '{}/data/'.format(BOOKTYPE_URL) |
# -*- coding: utf-8 -*- | |
import os | |
from unipath import Path | |
import djcelery | |
djcelery.setup_loader() | |
# DJANGO ADMIN | |
ADMINS = ( | |
# ('censored', '[email protected]'), |
$ cat /var/log/apache2/error.log | |
[Tue Jan 24 12:03:28.565032 2017] [mpm_event:notice] [pid 16834:tid 139748292564864] AH00489: Apache/2.4.10 (Debian) configured -- resuming normal operations | |
[Tue Jan 24 12:03:28.565138 2017] [core:notice] [pid 16834:tid 139748292564864] AH00094: Command line: '/usr/sbin/apache2' | |
[Tue Jan 24 12:03:30.824836 2017] [mpm_event:notice] [pid 16834:tid 139748292564864] AH00491: caught SIGTERM, shutting down | |
[Tue Jan 24 12:03:32.156095 2017] [wsgi:warn] [pid 17024:tid 140183461709696] mod_wsgi: Compiled for Python/2.7.8. | |
[Tue Jan 24 12:03:32.156171 2017] [wsgi:warn] [pid 17024:tid 140183461709696] mod_wsgi: Runtime using Python/2.7.9. | |
[Tue Jan 24 12:03:32.157446 2017] [mpm_event:notice] [pid 17024:tid 140183461709696] AH00489: Apache/2.4.10 (Debian) mod_wsgi/4.3.0 Python/2.7.9 configured -- resuming normal operations | |
[Tue Jan 24 12:03:32.157469 2017] [core:notice] [pid 17024:tid 140183461709696] AH00094: Command line: '/usr/sbin/apache2' |
$ ./manage.py update_permissions | |
/usr/local/lib/python2.7/dist-packages/django/core/management/__init__.py:345: RemovedInDjango110Warning: OptionParser usage for Django management commands is deprecated, use ArgumentParser instead | |
self.fetch_command(subcommand).run_from_argv(self.argv) | |
System check identified some issues: | |
WARNINGS: | |
?: (1_8.W001) The standalone TEMPLATE_* settings were deprecated in Django 1.8 and the TEMPLATES dictionary takes precedence. You must put the values of the following settings into your default TEMPLATES dict: TEMPLATE_DIRS, TEMPLATE_DEBUG. | |
core.BookRole.members: (fields.W340) null has no effect on ManyToManyField. | |
core.Role.permissions: (fields.W340) null has no effect on ManyToManyField. |
$ ./manage.py update_default_roles | |
System check identified some issues: | |
WARNINGS: | |
?: (1_8.W001) The standalone TEMPLATE_* settings were deprecated in Django 1.8 and the TEMPLATES dictionary takes precedence. You must put the values of the following settings into your default TEMPLATES dict: TEMPLATE_DIRS, TEMPLATE_DEBUG. | |
core.BookRole.members: (fields.W340) null has no effect on ManyToManyField. | |
core.Role.permissions: (fields.W340) null has no effect on ManyToManyField. | |
messaging.Endpoint.config: (fields.W342) Setting unique=True on a ForeignKey has the same effect as using a OneToOneField. | |
HINT: ForeignKey(unique=True) is usually better served by a OneToOneField. | |
Role registered_users has been created. |
$ ./manage.py runserver 0.0.0.0:8005 | |
Performing system checks... | |
System check identified some issues: | |
WARNINGS: | |
?: (1_8.W001) The standalone TEMPLATE_* settings were deprecated in Django 1.8 and the TEMPLATES dictionary takes precedence. You must put the values of the following settings into your default TEMPLATES dict: TEMPLATE_DIRS, TEMPLATE_DEBUG. | |
core.BookRole.members: (fields.W340) null has no effect on ManyToManyField. | |
core.Role.permissions: (fields.W340) null has no effect on ManyToManyField. | |
messaging.Endpoint.config: (fields.W342) Setting unique=True on a ForeignKey has the same effect as using a OneToOneField. |
$ ./manage.py migrate | |
System check identified some issues: | |
WARNINGS: | |
?: (1_8.W001) The standalone TEMPLATE_* settings were deprecated in Django 1.8 and the TEMPLATES dictionary takes precedence. You must put the values of the following settings into your default TEMPLATES dict: TEMPLATE_DIRS, TEMPLATE_DEBUG. | |
core.BookRole.members: (fields.W340) null has no effect on ManyToManyField. | |
core.Role.permissions: (fields.W340) null has no effect on ManyToManyField. | |
messaging.Endpoint.config: (fields.W342) Setting unique=True on a ForeignKey has the same effect as using a OneToOneField. | |
HINT: ForeignKey(unique=True) is usually better served by a OneToOneField. | |
Operations to perform: |