From a74b401036377a663e1ba3cd9f0dcfa9abc48e8a Mon Sep 17 00:00:00 2001 From: BiRabittoh Date: Fri, 14 Jul 2023 02:47:46 +0200 Subject: add pmwiki, better update scripts --- cgit/add_repo.sh | 9 ++++++--- .../nginx/proxy-confs/pmwiki.subdomain.conf | 21 +++++++++++++++++++++ swag/etc-config-swag/www/rss/update.sh | 5 ----- swag/etc-config-swag/www/rss_update.sh | 7 +++++++ swag/etc-config-swag/www/wiki_update.sh | 12 ++++++++++++ 5 files changed, 46 insertions(+), 8 deletions(-) create mode 100644 swag/etc-config-swag/nginx/proxy-confs/pmwiki.subdomain.conf delete mode 100755 swag/etc-config-swag/www/rss/update.sh create mode 100755 swag/etc-config-swag/www/rss_update.sh create mode 100755 swag/etc-config-swag/www/wiki_update.sh diff --git a/cgit/add_repo.sh b/cgit/add_repo.sh index 53c083f..cc95a88 100755 --- a/cgit/add_repo.sh +++ b/cgit/add_repo.sh @@ -1,6 +1,6 @@ #!/bin/sh -BASE_REPO_DIR="/etc/config/cgit" +BASE_REPO_DIR="public_repos/" GIT_USER="BiRabittoh" GIT_EMAIL="birabittoh@duck.com" @@ -16,7 +16,7 @@ if [ -z "$repo_desc" ]; then exit 1 fi -repo_path="$BASE_REPO_DIR/$repo_name" +repo_path="$HOME/$BASE_REPO_DIR/$repo_name" if [ -d "$repo_path" ]; then echo "$repo_name already exists." @@ -30,4 +30,7 @@ git init --bare $repo_path git -C $repo_path config --local gitweb.owner "$GIT_USER <$GIT_EMAIL>" echo "$repo_desc" > $repo_path/description -echo "Done." +echo +echo "git remote add birabittoh user@birabittoh.duckdns.org:public_repos/$repo_name" +echo "git push -u birabittoh master" +echo diff --git a/swag/etc-config-swag/nginx/proxy-confs/pmwiki.subdomain.conf b/swag/etc-config-swag/nginx/proxy-confs/pmwiki.subdomain.conf new file mode 100644 index 0000000..8ae783e --- /dev/null +++ b/swag/etc-config-swag/nginx/proxy-confs/pmwiki.subdomain.conf @@ -0,0 +1,21 @@ +server { + listen 443 ssl http2; + listen [::]:443 ssl http2; + + server_name w.*; + + include /config/nginx/ssl.conf; + + client_max_body_size 0; + + root /config/www/wiki; + + index index.php pmwiki.php; + + location ~ ^(.+\.php)(.*)$ { + fastcgi_split_path_info ^(.+\.php)(.*)$; + fastcgi_pass 127.0.0.1:9000; + fastcgi_index index.php; + include /etc/nginx/fastcgi_params; + } +} diff --git a/swag/etc-config-swag/www/rss/update.sh b/swag/etc-config-swag/www/rss/update.sh deleted file mode 100755 index 0edd021..0000000 --- a/swag/etc-config-swag/www/rss/update.sh +++ /dev/null @@ -1,5 +0,0 @@ -#!/bin/sh -LINK=https://raw.githubusercontent.com/tontof/kriss_feed/master/ -FILENAME=index.php - -wget -O $(dirname "$0")/$FILENAME $LINK$FILENAME diff --git a/swag/etc-config-swag/www/rss_update.sh b/swag/etc-config-swag/www/rss_update.sh new file mode 100755 index 0000000..97b4b31 --- /dev/null +++ b/swag/etc-config-swag/www/rss_update.sh @@ -0,0 +1,7 @@ +#!/bin/sh +LINK=https://raw.githubusercontent.com/tontof/kriss_feed/master/ +FILENAME=index.php +SUBFOLDER="$(dirname "$0")/rss/" + +mkdir $SUBFOLDER +wget -O $SUBFOLDER$FILENAME $LINK$FILENAME diff --git a/swag/etc-config-swag/www/wiki_update.sh b/swag/etc-config-swag/www/wiki_update.sh new file mode 100755 index 0000000..8a9e7f0 --- /dev/null +++ b/swag/etc-config-swag/www/wiki_update.sh @@ -0,0 +1,12 @@ +#!/bin/bash +LINK=https://pmwiki.org/pub/pmwiki/ +FILENAME=pmwiki-latest.tgz +SCRIPT_PATH=$(dirname "$0") +DOWNLOADED_PATH=$SCRIPT_PATH/$FILENAME + +wget -O $DOWNLOADED_PATH $LINK$FILENAME +tar zxvf $DOWNLOADED_PATH + +var=(pmwiki-*) +mv $var wiki +rm $DOWNLOADED_PATH -- cgit 1.4.1-2-gfad0