Skip to content
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

Fix script compatiable with OpenWrt #19000

Merged
merged 4 commits into from
Mar 8, 2022
Merged

Fix script compatiable with OpenWrt #19000

merged 4 commits into from
Mar 8, 2022

Conversation

mokeyish
Copy link
Contributor

@mokeyish mokeyish commented Mar 4, 2022

/etc/init.d/gitea

#!/bin/sh /etc/rc.common

USE_PROCD=1

# PROCD_DEBUG=1

START=90
STOP=10

PROG=/opt/gitea/gitea
GITEA_WORK_DIR=/opt/gitea
CONF_FILE=$GITEA_WORK_DIR/app.ini

start_service(){
    procd_open_instance gitea
    procd_set_param env GITEA_WORK_DIR=$GITEA_WORK_DIR
    procd_set_param env HOME=$GITEA_WORK_DIR
    procd_set_param command $PROG web -c $CONF_FILE
    procd_set_param file $CONF_FILE
    procd_set_param user git
    procd_set_param respawn ${respawn_threshold:-3600} ${respawn_timeout:-5} ${respawn_retry:-5} # respawn automatically if something died, be careful if you have an alternative process supervisor
    procd_close_instance
}

start(){
    service_start $PROG
}

stop(){
    service_stop $PROG
}

reload(){
    service_reload $PROG
}

@Gusted Gusted added this to the 1.17.0 milestone Mar 4, 2022
@Gusted Gusted added the type/enhancement An improvement of existing functionality label Mar 4, 2022
contrib/upgrade.sh Outdated Show resolved Hide resolved
@GiteaBot GiteaBot added the lgtm/need 2 This PR needs two approvals by maintainers to be considered for merging. label Mar 6, 2022
@mokeyish mokeyish closed this Mar 7, 2022
@mokeyish mokeyish reopened this Mar 7, 2022
@zeripath
Copy link
Contributor

zeripath commented Mar 8, 2022

Please avoid force pushing once people have started reviews it makes keeping up with changes difficult.

contrib/upgrade.sh Outdated Show resolved Hide resolved
Copy link
Contributor

@Gusted Gusted left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Shellcheck suggestions

contrib/upgrade.sh Outdated Show resolved Hide resolved
contrib/upgrade.sh Outdated Show resolved Hide resolved
Co-authored-by: Gusted <williamzijl7@hotmail.com>
Co-authored-by: zeripath <art27@cantab.net>
@GiteaBot GiteaBot added lgtm/need 1 This PR needs approval from one additional maintainer to be merged. and removed lgtm/need 2 This PR needs two approvals by maintainers to be considered for merging. labels Mar 8, 2022
contrib/upgrade.sh Outdated Show resolved Hide resolved
Copy link
Member

@noerw noerw left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

one wording nit, otherwise lgtm. thanks!

@GiteaBot GiteaBot added lgtm/done This PR has enough approvals to get merged. There are no important open reservations anymore. and removed lgtm/need 1 This PR needs approval from one additional maintainer to be merged. labels Mar 8, 2022
techknowlogick and others added 2 commits March 8, 2022 17:47
Co-authored-by: Norwin <noerw@users.noreply.github.com>
@techknowlogick techknowlogick merged commit ddf7f13 into go-gitea:main Mar 8, 2022
zjjhot added a commit to zjjhot/gitea that referenced this pull request Mar 9, 2022
* giteaofficial/main:
  Add button for issue deletion (go-gitea#19032)
  Fix script compatiable with OpenWrt (go-gitea#19000)
  Allow users to self-request a PR review (go-gitea#19030)
  Fix wrong scopes caused by empty scope input (go-gitea#19029)
  Feature: show issue assignee on project board (go-gitea#15232)
  bump go deps (go-gitea#19021)
  Don't show context cancelled errors in attribute reader (go-gitea#19006)
  Set `rel="nofollow noindex"` on new issue links (go-gitea#19023)
  update to correct stable version
@mokeyish mokeyish deleted the patch-1 branch March 22, 2022 00:54
Chianina pushed a commit to Chianina/gitea that referenced this pull request Mar 28, 2022
* Fix compatibility of upgrade.sh in openwrt and add service init script for openwrt.

* Apply suggestions from code review

Co-authored-by: Gusted <williamzijl7@hotmail.com>
Co-authored-by: zeripath <art27@cantab.net>

* Update contrib/upgrade.sh

Co-authored-by: Norwin <noerw@users.noreply.github.com>

Co-authored-by: 6543 <6543@obermui.de>
Co-authored-by: Gusted <williamzijl7@hotmail.com>
Co-authored-by: zeripath <art27@cantab.net>
Co-authored-by: techknowlogick <matti@mdranta.net>
Co-authored-by: Norwin <noerw@users.noreply.github.com>
Co-authored-by: techknowlogick <techknowlogick@gitea.io>
@go-gitea go-gitea locked and limited conversation to collaborators Apr 28, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
lgtm/done This PR has enough approvals to get merged. There are no important open reservations anymore. type/enhancement An improvement of existing functionality
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

7 participants