This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
#################### | |
# CKAN installation script | |
# based on http://docs.ckan.org/en/master/install-from-source.html | |
#################### | |
# @TODO Get these values as flags | |
dbpassword='abcde12345' | |
readonlydbpassword='abcde12345' |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
timestamp=`date -u +%Y-%m-%d_%H-%M-%S` | |
tempdir=~/backups/localwiki-backup-$timestamp | |
# set stage | |
mkdir $tempdir -p # make (-p) parent directories as needed | |
# do the dirty work | |
cp -r /usr/share/localwiki/ $tempdir/usr.share.localwiki/ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from django.db import models | |
class Status(models.Model): | |
open = models.BooleanField() | |
status = models.CharField(max_length=None) | |
lastchange = models.DateTimeField() # needs to be longint | |
class Events(models.Model): # example is "fire-alarm" | |
status = models.ForeignKey('Status') | |
name = models.CharField(max_length=None) |
NewerOlder