Skip to content
This repository has been archived by the owner on Jan 4, 2023. It is now read-only.

Commit

Permalink
use custom conf file if present
Browse files Browse the repository at this point in the history
  • Loading branch information
jfqd committed Apr 6, 2022
1 parent 91d1d76 commit c86aef2
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions copy/var/zoneinit/includes/41-gogs.sh
Original file line number Diff line number Diff line change
Expand Up @@ -10,5 +10,15 @@ gsed -i \

svcadm restart svc:/network/ssh:default

if mdata-get vfstab 1>/dev/null 2>&1; then
MOUNT_FOLDER=$(mdata-get vfstab | awk '{print $3}')
if [[ -f "${MOUNT_FOLDER}/app.ini" ]]; then
mkdir -p home/gogs/go/src/github.com/gogs/gogs/custom/conf
cp "${MOUNT_FOLDER}/app.ini" /home/gogs/go/src/github.com/gogs/gogs/custom/conf/app.ini
else
# TODO: setup app.ini via mdata if custom conf is missing
fi
fi

svccfg import /opt/local/lib/svc/manifest/gogs.xml
svcadm enable -r svc:/application/gogs:default

0 comments on commit c86aef2

Please sign in to comment.