home
·
contact
·
privacy
projects
/
config
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Set up sending mail server for URL catcher.
[config]
/
buster
/
setup_scripts
/
setup_website.sh
diff --git
a/buster/setup_scripts/setup_website.sh
b/buster/setup_scripts/setup_website.sh
index fef4b6772282d0cc25cf2c2d3606518032809c12..5c8d00ce30cf7f2843ae27970cb376591f43a67e 100755
(executable)
--- a/
buster/setup_scripts/setup_website.sh
+++ b/
buster/setup_scripts/setup_website.sh
@@
-1,7
+1,5
@@
#!/bin/sh
set -e
#!/bin/sh
set -e
-set -x
-# Heavily inspired by <https://docs-develop.pleroma.social/backend/installation/debian_based_en/>
if [ "$#" -ne 4 ]; then
echo 'Need domain name and mail and old server IP and key ID as argument.'
if [ "$#" -ne 4 ]; then
echo 'Need domain name and mail and old server IP and key ID as argument.'
@@
-35,7
+33,7
@@
sed -i "s/REPLACE_fqdn_ECALPER/${domain}/g" /etc/gitweb.conf
sed -i "s/REPLACE_fqdn_ECALPER/${domain}/g" /etc/nginx/sites-available/website.nginx
ln -s /etc/nginx/sites-available/website.nginx /etc/nginx/sites-enabled/website.nginx
sed -i "s/REPLACE_fqdn_ECALPER/${domain}/g" /etc/nginx/sites-available/website.nginx
ln -s /etc/nginx/sites-available/website.nginx /etc/nginx/sites-enabled/website.nginx
-# Set up website.
+# Set up website.
TODO: use non-/var/www dir for better separation to dump site
rm -rf /var/www
mkdir /var/www
chown plom:plom /var/www
rm -rf /var/www
mkdir /var/www
chown plom:plom /var/www
@@
-46,6
+44,7
@@
read -p'Hit Enter when you are done.' ignore
su -lc "cd /var/repos && git clone --mirror ${old_server}:repos/website" plom
cp "${config_tree_prefix}/other_files/website_hook_post-receive" /var/repos/website.git/hooks/post-receive
su -lc 'cd /var/www && git clone /var/repos/website.git .' plom
su -lc "cd /var/repos && git clone --mirror ${old_server}:repos/website" plom
cp "${config_tree_prefix}/other_files/website_hook_post-receive" /var/repos/website.git/hooks/post-receive
su -lc 'cd /var/www && git clone /var/repos/website.git .' plom
+rm /home/plom/prepare_to_meet_server.sh
# Add encryption key.
keyservers='sks-keyservers.net/ keys.gnupg.net'
# Add encryption key.
keyservers='sks-keyservers.net/ keys.gnupg.net'
@@
-84,13
+83,6
@@
chown plom:plom /home/plom/.plomlombot
systemctl enable plomlombot.service
service plomlombot start
systemctl enable plomlombot.service
service plomlombot start
-# Migrate borg repo.
-cp "${config_tree_prefix}/setup_scripts/mirror_dir.sh" /home/plom/
-su -lc "./mirror_dir.sh ${old_server} /home/plom/borg" plom
-
-# Clean up
-rm /home/plom/{prepare_to_meet_server,mirror_dir}.sh
-
# TODO:
# - commit git-daemon-export-ok directly into the public repos; rename
# /home/plom/public_repos to /home/plom/repos
# TODO:
# - commit git-daemon-export-ok directly into the public repos; rename
# /home/plom/public_repos to /home/plom/repos