Merge branch 'patch-3' into 'master'
Make this a site-specific install for use post-testing. See merge request jjwiseman/advisory-circular!4
This commit is contained in:
commit
c2b2ac23b0
19
install.sh
19
install.sh
@ -7,6 +7,14 @@ user=advisorycircular
|
||||
|
||||
if test `whoami` != root; then echo you must run this as root ; exit 1 ; fi
|
||||
|
||||
site="$1"
|
||||
|
||||
if test -z "$site"
|
||||
then
|
||||
echo usage: $0 sitename
|
||||
exit 1
|
||||
fi
|
||||
|
||||
# Create install, config, and run directories if they doesn't exist.
|
||||
echo Creating directories
|
||||
mkdir -p "$install_dir"
|
||||
@ -37,7 +45,11 @@ cp out/advisorycircular.js "$install_dir"/out
|
||||
cp config-skel.yaml "$config_dir"
|
||||
cp secrets-skel.yaml "$config_dir"
|
||||
|
||||
cp config.yaml "$config_dir"/"$site"-config.yaml
|
||||
cp secrets.yaml "$config_dir"/"$site"-secrets.yaml
|
||||
|
||||
cp advisorycircular@.service /lib/systemd/system
|
||||
cp advisorycircular@.service /lib/systemd/system/advisorycircular@"$site".service
|
||||
|
||||
# Download aircraft info DB.
|
||||
echo Downloading aircraft info database
|
||||
@ -51,5 +63,10 @@ chown -R "$user" "$install_dir"
|
||||
chown -R "$user" "$config_dir"
|
||||
chown -R "$user" "$run_dir"
|
||||
|
||||
chmod go-r "$config_dir"/secrets-skel.yaml
|
||||
chmod go-r "$config_dir"/secrets*.yaml
|
||||
chmod go-w "$run_dir"
|
||||
|
||||
echo "Installation complete."
|
||||
echo "You probably want to execute the following:"
|
||||
echo "sudo systemctl enable advisorycircular@${site}.service"
|
||||
echo "sudo systemctl start advisorycircular@${site}.service"
|
Loading…
Reference in New Issue
Block a user