-
-
Notifications
You must be signed in to change notification settings - Fork 5.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add init file for Ubuntu #23362
Add init file for Ubuntu #23362
Conversation
f2501c2
to
d816ddb
Compare
I'm not familiar with WSL. Could you please show me more context? |
This comment was marked as off-topic.
This comment was marked as off-topic.
WSL stands for Windows Subsystem for Linux, a convenient tool that allows native Linux command-line tools to be run directly on Windows and is utilized by many developers. Ubuntu is generally the preferred distribution for WSL, and solution for such users. Since the use of systemd can cause problems in this environment, I chose as a solution to create an init file that can be used more simply as a daemon. It should also work fine on native Ubuntu. |
Is there a difference between the debian file and this one? |
Yep has difference. diff--- debian 2023-03-09 00:44:10.810176200 +0900
+++ ubuntu 2023-03-09 00:44:25.400832800 +0900
@@ -1,7 +1,8 @@
do_start()
{
- $USERBIND $DAEMON
- sh -c "USER=$USER HOME=/home/$USER GITEA_WORK_DIR=$WORKINGDIR start-stop-daemon --start --quiet --pidfile $PIDFILE --make-pidfile \\
+ GITEA_ENVS="USER=$USER GITEA_WORK_DIR=$WORKINGDIR HOME=/home/$USER"
+ GITEA_EXEC="$DAEMON -- $DAEMON_ARGS"
+ sh -c "start-stop-daemon --start --quiet --pidfile $PIDFILE --make-pidfile \\
--background --chdir $WORKINGDIR --chuid $USER \\
- --exec $DAEMON -- $DAEMON_ARGS"
+ --exec /bin/bash -- -c '/usr/bin/env $GITEA_ENVS $GITEA_EXEC'"
} Environment variables are not setled correctly with the Debian file, and I get the following error.
FYI: Debian files may not work on Debian. Also I'm an Ubuntu user so I made it as Ubuntu file. |
OK I guess we can leave the debian script, those two OS do sometimes work differently. |
🎺 🤖 |
* giteaofficial/main: Improve squash merge commit author and co-author with private emails (go-gitea#22977) Fix broken Chroma CSS styles (go-gitea#23174) Add gradle samples in maven doc of packages (go-gitea#23374) Fix and move "Use this template" button (go-gitea#23398) [skip ci] Updated translations via Crowdin Add init file for Ubuntu (go-gitea#23362) Rename `canWriteUnit` to `canWriteProjects` (go-gitea#23386) Fix pull request update showing too many commits with multiple branches (go-gitea#22856) Fix incorrect NotFound conditions in org/projects.go (go-gitea#23384) Refactor merge/update git command calls (go-gitea#23366) Redirect to project again after editing it (go-gitea#23326) Add Gitea Community Code of Conduct (go-gitea#23188)
Created an init file for Ubuntu that will be useful when running it on WSL.