mirror of
https://github.com/go-gitea/gitea.git
synced 2024-12-29 08:55:45 +00:00
24 lines
549 B
Bash
24 lines
549 B
Bash
|
#!/bin/bash
|
||
|
|
||
|
if ! env | grep -q root; then
|
||
|
echo "
|
||
|
+----------------------------------------+
|
||
|
| You are not running gitea as root. |
|
||
|
| This is required for the snap package. |
|
||
|
| Please re-run as root. |
|
||
|
+----------------------------------------+
|
||
|
"
|
||
|
$SNAP/gitea/gitea --help
|
||
|
exit 1
|
||
|
fi
|
||
|
|
||
|
# Set usernames for gitea
|
||
|
export USERNAME=root
|
||
|
export USER=root
|
||
|
|
||
|
export GITEA_WORK_DIR=$(snapctl get gitea.snap.workdir)
|
||
|
export GITEA_CUSTOM=$(snapctl get gitea.snap.custom)
|
||
|
|
||
|
$SNAP/bin/gconfig save
|
||
|
cd $SNAP/gitea; ./gitea $@
|