mirror of
https://github.com/community-scripts/ProxmoxVE.git
synced 2025-04-23 15:08:06 +00:00
Seafile - Minor bug fix: domain.sh script fix (#3046)
* Create zitadel-install.sh * Create zitadel.json * Create zitadel.sh * Update zitadel.sh Edit reference back to upstream build.func * Update zitadel.json Co-authored-by: Slaviša Arežina <58952836+tremor021@users.noreply.github.com> * Update zitadel.sh Co-authored-by: Slaviša Arežina <58952836+tremor021@users.noreply.github.com> * Update zitadel.sh Co-authored-by: Slaviša Arežina <58952836+tremor021@users.noreply.github.com> * Update zitadel.sh Co-authored-by: Slaviša Arežina <58952836+tremor021@users.noreply.github.com> * Update zitadel.sh Co-authored-by: Slaviša Arežina <58952836+tremor021@users.noreply.github.com> * Update zitadel.sh * Update zitadel-install.sh Co-authored-by: Slaviša Arežina <58952836+tremor021@users.noreply.github.com> * Update zitadel-install.sh Co-authored-by: Slaviša Arežina <58952836+tremor021@users.noreply.github.com> * Update zitadel.sh Co-authored-by: bvdberg01 <74251551+bvdberg01@users.noreply.github.com> * Update zitadel.json Co-authored-by: bvdberg01 <74251551+bvdberg01@users.noreply.github.com> * Use declared variables in config files * Remove other architectures * Update to fit changes requested Include mc for install; removal of variable ARCH and put into direct links; correct the default resources required * Update zitadel.sh Co-authored-by: bvdberg01 <74251551+bvdberg01@users.noreply.github.com> * Update zitadel-install.sh Co-authored-by: bvdberg01 <74251551+bvdberg01@users.noreply.github.com> * Update zitadel-install.sh Co-authored-by: bvdberg01 <74251551+bvdberg01@users.noreply.github.com> * Made changes to fit suggestions * Update zitadel-install.sh correct version output * Update zitadel-install.sh * Update path for version.txt * Set update part default to our project defaults * Update zitadel.sh, Remove v befor ${RELEASE} * Update zitadel-install.sh * Created Seafile script * Update seafile-install.sh Removed sudo and tarball when cleaning up. * Update seafile-install.sh * Updated script Corrected source and remove comments * Move dependencies Move Python installation and dependencies down to Python block. Fix typos. * Update seafile-install.sh Missing -y * Fix typo * Remove python lib deps version pinning * Update seafile-install.sh * Use generated password instead of plain text * Change reference * Reset reference * Update seafile-install.sh * Update seafile.json * Fix syntax error * Fix uploading files error and broken MOTD * Fix systemd file and corrected domain.sh script * Added better explanation of domain.sh script usage * Edited script creation date --------- Co-authored-by: Slaviša Arežina <58952836+tremor021@users.noreply.github.com> Co-authored-by: bvdberg01 <74251551+bvdberg01@users.noreply.github.com> Co-authored-by: CanbiZ <47820557+MickLesk@users.noreply.github.com> Co-authored-by: Michel Roegl-Brunner <73236783+michelroegl-brunner@users.noreply.github.com>
This commit is contained in:
parent
936a526de3
commit
b95e6ec9cf
@ -188,6 +188,8 @@ msg_info "Adjusting Conf files"
|
|||||||
sed -i "0,/127.0.0.1/s/127.0.0.1/0.0.0.0/" /opt/seafile/conf/gunicorn.conf.py
|
sed -i "0,/127.0.0.1/s/127.0.0.1/0.0.0.0/" /opt/seafile/conf/gunicorn.conf.py
|
||||||
sed -i "0,/SERVICE_URL = \"http:\/\/$IP\"/s/SERVICE_URL = \"http:\/\/$IP\"/SERVICE_URL = \"http:\/\/$IP:8000\"/" /opt/seafile/conf/seahub_settings.py
|
sed -i "0,/SERVICE_URL = \"http:\/\/$IP\"/s/SERVICE_URL = \"http:\/\/$IP\"/SERVICE_URL = \"http:\/\/$IP:8000\"/" /opt/seafile/conf/seahub_settings.py
|
||||||
echo -e "\nFILE_SERVER_ROOT = \"http://$IP:8082\"" >> /opt/seafile/conf/seahub_settings.py
|
echo -e "\nFILE_SERVER_ROOT = \"http://$IP:8082\"" >> /opt/seafile/conf/seahub_settings.py
|
||||||
|
echo -e "CSRF_TRUSTED_ORIGINS = [\"http://$IP/\"]" >> /opt/seafile/conf/seahub_settings.py
|
||||||
|
echo -e "ALLOWED_HOSTS = [\"$IP\"]" >> /opt/seafile/conf/seahub_settings.py
|
||||||
echo -e "CSRF_TRUSTED_ORIGINS = ['http://$IP/']" >> /opt/seafile/conf/seahub_settings.py
|
echo -e "CSRF_TRUSTED_ORIGINS = ['http://$IP/']" >> /opt/seafile/conf/seahub_settings.py
|
||||||
msg_ok "Conf files adjusted"
|
msg_ok "Conf files adjusted"
|
||||||
|
|
||||||
@ -224,13 +226,14 @@ After=network.target mysql.service memcached.service
|
|||||||
Wants=mysql.service memcached.service
|
Wants=mysql.service memcached.service
|
||||||
|
|
||||||
[Service]
|
[Service]
|
||||||
Type=forking
|
Type=oneshot
|
||||||
User=seafile
|
User=seafile
|
||||||
Group=seafile
|
Group=seafile
|
||||||
WorkingDirectory=/opt/seafile
|
WorkingDirectory=/opt/seafile
|
||||||
|
RemainAfterExit=yes
|
||||||
|
|
||||||
ExecStart=/opt/seafile/seafile-server-latest/seafile.sh start
|
ExecStart=/opt/seafile/seafile-server-latest/seafile.sh start
|
||||||
ExecStartPost=/opt/seafile/seafile-server-latest/seahub.sh start
|
ExecStart=/opt/seafile/seafile-server-latest/seahub.sh start
|
||||||
ExecStop=/opt/seafile/seafile-server-latest/seahub.sh stop
|
ExecStop=/opt/seafile/seafile-server-latest/seahub.sh stop
|
||||||
ExecStop=/opt/seafile/seafile-server-latest/seafile.sh stop
|
ExecStop=/opt/seafile/seafile-server-latest/seafile.sh stop
|
||||||
|
|
||||||
@ -265,8 +268,13 @@ IP=$(ip a s dev eth0 | awk '/inet / {print $2}' | cut -d/ -f1)
|
|||||||
DOMAIN_NOSCHEME=$(echo $DOMAIN | sed 's|^https://||')
|
DOMAIN_NOSCHEME=$(echo $DOMAIN | sed 's|^https://||')
|
||||||
|
|
||||||
#Change the CORS to provided domain
|
#Change the CORS to provided domain
|
||||||
sed -i "s|CSRF_TRUSTED_ORIGINS = ['http://$IP:8000/']|CSRF_TRUSTED_ORIGINS = ['$DOMAIN']|g" /opt/seafile/conf/seahub_settings.py
|
sed -i "s|SERVICE_URL = \"http://$IP:8000\"|SERVICE_URL = \"$DOMAIN\"|g" /opt/seafile/conf/seahub_settings.py
|
||||||
|
sed -i "s|CSRF_TRUSTED_ORIGINS = \[\"http://$IP/\"\]|CSRF_TRUSTED_ORIGINS = \[\"$DOMAIN/\"\]|g" /opt/seafile/conf/seahub_settings.py
|
||||||
sed -i "s|FILE_SERVER_ROOT = \"http://$IP:8082\"|FILE_SERVER_ROOT = \"$DOMAIN/seafhttp\"|g" /opt/seafile/conf/seahub_settings.py
|
sed -i "s|FILE_SERVER_ROOT = \"http://$IP:8082\"|FILE_SERVER_ROOT = \"$DOMAIN/seafhttp\"|g" /opt/seafile/conf/seahub_settings.py
|
||||||
|
sed -i "s|ALLOWED_HOSTS = \[\"$IP\"\]|ALLOWED_HOSTS = \[\"\.$DOMAIN_NOSCHEME\"\]|g" /opt/seafile/conf/seahub_settings.py
|
||||||
|
|
||||||
|
systemctl restart seafile
|
||||||
|
echo "Seafile server restarted! Access it at $DOMAIN."
|
||||||
EOF
|
EOF
|
||||||
chmod +x ~/domain.sh
|
chmod +x ~/domain.sh
|
||||||
msg_ok "Bash Script for Domain access created"
|
msg_ok "Bash Script for Domain access created"
|
||||||
|
@ -40,7 +40,7 @@
|
|||||||
"type": "info"
|
"type": "info"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"text": "Execute `~/domain.sh <HTTPS://YOUR_DOMAIN.COM_HERE>` to enable access to Seafile via your domain",
|
"text": "Execute `~/domain.sh <FULL_DOMAIN_URL_WITH_HTTPS_OR_HTTP>` to enable access to Seafile via your domain. Example: ~/domain.sh https://seafile.example.com",
|
||||||
"type": "info"
|
"type": "info"
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
|
Loading…
x
Reference in New Issue
Block a user