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

Package this project as deb #2

Open
wants to merge 7 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
debian/.debhelper/
debian/debhelper-build-stamp
debian/files
debian/alternc*.log
debian/alternc*.substvars
debian/alternc*/
*.gpg
9 changes: 0 additions & 9 deletions README

This file was deleted.

44 changes: 44 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
# HTTPPERM

an OUTGOING http/https filtering/logging interface
for AlternC hosting control panel


## Configuration

Once pacakge retrieved and installed, you need to enable iptables rules
* Check [httpperm-iptables-script.sh](httpperm-iptables-script.sh) script
* Adapt it
* Deploy it
* Enjoy

## Get the package

### Build own package

You can compile this package with:

```
apt install build-essential debhelper git
git clone https://github.com/AlternC/alternc-httperm/
cd alternc-httperm
dpkg-buildpackage -us -uc
```

### From GitHub

You can obtain nightly and last stable package from the dedicated page : [releases page](https://github.com/AlternC/alternc-httperm/releases)

### From our repository

You can get package from our official repository : [debian.alternc.org](https://debian.alternc.org/)

## Dependency

You need an AlternC 3.3.* (only).

## How to use

This package supports only AlternC 3.3.
Original code was set to AlternC 3.3 and could be deployed manually

7 changes: 7 additions & 0 deletions debian/changelog
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
alternc-httpperm (0.0.1) stretch buster; urgency=medium

* False package version
* Version created only to follow git history
* Start nightly build from a stable version

-- Benjamin Sonntag <[email protected]> Thu, 10 Aug 2017 10:36:00 +0200
1 change: 1 addition & 0 deletions debian/compat
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
10
20 changes: 20 additions & 0 deletions debian/control
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
Source: alternc-httpperm
Section: admin
Priority: optional
Maintainer: AlternC Team <[email protected]>
Build-Depends: debhelper (>= 8)
Standards-Version: 3.9.8

Package: alternc-httpperm
Priority: optional
Section: admin
Architecture: all
Depends: alternc (>= 3.1), alternc (< 3.5), apache2 (>= 2.4), iptables, ipset
Description: PHP-httpperm for AlternC
AlternC is a mutualized hosting software manager for Linux.
It allows you to manage your websites, domains, ftp, emails, aliases,
web statistics, mailing-lists, etc.
.
This package is an optional module to manage OUTGOING http/https filtering/logging
.
More information on https://www.alternc.com/
17 changes: 17 additions & 0 deletions debian/copyright
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
Copyright:

LICENSE

This program is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public License (GPL)
as published by the Free Software Foundation; either version 2
of the License, or (at your option) any later version.

This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.

On Debian systems, the complete text of the GNU General Public
License can be found in /usr/share/common-licenses/GPL file.

4 changes: 4 additions & 0 deletions debian/cron.d
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
SHELL=/bin/bash
PATH=/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin

* * * * * root cd /usr/lib/alternc && php httpperm_cron.php &>/dev/null
1 change: 1 addition & 0 deletions debian/install
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
src/* .
26 changes: 26 additions & 0 deletions debian/postinst
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
#!/bin/bash -e

ALTERNC_FUNCTIONS_FILE="/usr/lib/alternc/functions.sh"
HTTPPERM_SQL_FILE="/usr/share/alternc/install/httpperm.sql"

if [ ! -r "${ALTERNC_FUNCTIONS_FILE}" ]; then
echo "Can't access ${ALTERNC_FUNCTIONS_FILE}"
exit 1
fi

# shellcheck source=/dev/null
. "${ALTERNC_FUNCTIONS_FILE}"

case "$1" in
configure)
mysql_query "$(cat ${HTTPPERM_SQL_FILE})"
printf "\tDon't forget to apply httpperm iptables rules as explained on Readme\n"
;;

triggered)
;;
esac

# dh_installdeb will replace this with shell code automatically
# generated by other debhelper scripts.
#DEBHELPER#
5 changes: 5 additions & 0 deletions debian/rules
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
#!/usr/bin/make -f
#export DH_VERBOSE = 1

%:
dh $@
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.