-
Notifications
You must be signed in to change notification settings - Fork 5
/
Copy pathcouncilmatic.conf.model
65 lines (59 loc) · 3.43 KB
/
councilmatic.conf.model
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
#!/usr/bin/env bash
#
# councilmatic.conf
#
# This is a local configuration file for Councilmatic. It is to be placed with the Bash and Pytyon files
# that build the static web site files.
#
# Written by Tom Theimer - February 26, 2021 Updated April 16, 2021
#
# Because this file is executed by one or more Bash scripts it must have execute permission(s).
#
# The following lines of code are intended for the production directory and they are only intented as an
# aid to a site maintainer who may be manually executing a script to force an update. THESE LINES MAY ALSO
# BE USEFUL when cloning and testing the code on another platform. If one of the target
# scripts is launched in production without root privileges, it will only partially run and therefore
# require to be rerun under 'sudo'. DO NOT use this in the dev environment as dev code should always be
# run with the privileges of the dev group.
## Creating an associative array where the keys are the file names that must be run as root.
#declare -A targetFilesAR=(
# ["Scraper_Twitter.sh"]=0 ["ScraperUpdate2.sh"]=0 ["Scraper_full_json.sh"]=0
#)
#
## Getting the name of the currently running script
#script_name=`basename "$0"`
##echo $script_name
#
## If the currently running script name is one of the target files then check for root privileges.
## Note in the following that the -n switch causes the test to evaluate to True if the following argument is NOT an empty string.
#if [[ -n "${targetFilesAR[$script_name]}" ]]
#then
# if [ "$EUID" -ne 0 ]
# then echo "! ! ! ! ! ! This script must be run as root (sudo $script_name)"
# exit
# fi
#fi
# - - - - - - - - - - End of code block - - - - - - - - - -
# WEBSITEPATH identifies the location of the static web site files generated by the bash and Python files
# in the directory that contains this councilmatic.conf file. If WEBSITEPATH is not assigned a value
# then no static site files will be written.
# e.g. for nginx/apache: WEBSITEPATH='/var/www/councilmatic'
# e.g. for unhosted local machine: WEBSITEPATH='/home/username/testwebsite'
# or WEBSITEPATH='/home/username/testwebsite/dev'
# NOTE leading '/' and no '/' at the end
WEBSITEPATH='/var/www/councilmatic/dev'
# WEBSITEPATHRELATIVETOROOT can be ignored on a dev machine where the generated site files will not be linked to a
# domain and called by a browser. This variable is to contain the directory name that appears after the URL
# hostname to access the website files that were generated by this code set.
# - If the generated site files are called by the hostname only (e.g. www.mysite.com) then the value of this
# variable is an empty string ('').
# - If the generated site files are called by www.mysite.com/devsite then the value of this variable must be 'devsite/'.
# This value is determined by the configuration of the web server and not the physical path of the generated
# web site files (as in WEBSITEPATH) even though the directory naming may be the same or similar.
# e.g. for nginx/apache: WEBSITEPATHRELATIVETOROOT='' or WEBSITEPATHRELATIVETOROOT='dev/'
# e.g. for unhosted local machine: WEBSITEPATHRELATIVETOROOT='home/username/testwebsite/' or WEBSITEPATHRELATIVETOROOT='home/username/testwebsite/dev/'
# NOTE trailing '/' and no leading '/'
WEBSITEPATHRELATIVETOROOT='dev/'
# export so python can access this environment variable
export WEBSITEPATHRELATIVETOROOT
PYTHON=/home/howard/miniconda3/bin/python # The location of Python 3 on this computer.