Browse Source

deb file

pull/1/head
Stephen 8 months ago
parent
commit
fe21629c9a
5 changed files with 48 additions and 6 deletions
  1. +20
    -2
      Cargo.toml
  2. +4
    -4
      Jenkinsfile
  3. +9
    -0
      debian/config.toml
  4. +1
    -0
      debian/maintainer_scripts/postinst
  5. +14
    -0
      debian/proxy-manager.service

+ 20
- 2
Cargo.toml View File

@ -1,8 +1,9 @@
[package]
name = "proxy_manager"
version = "0.1.0"
authors = ["Stephen D"]
authors = ["Stephen D <@stephen:m.scd31.com>"]
edition = "2018"
description = "Manages web proxies across different projects/processes"
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
@ -12,4 +13,21 @@ serde = { version = "1.0", features = ["derive"] }
chrono = "0.4.15"
warp = "0.2"
tokio = { version = "0.2", features = ["macros"] }
rand = "0.7.3"
rand = "0.7.3"
[package.metadata.deb]
maintainer = "Stephen D <@stephen:m.scd31.com>"
copyright = "2020, Stephen D <@stephen:m.scd31.com>"
extended-description = """\
Manages web proxies across different projects/processes
"""
depends = "systemd"
section = "utility"
priority = "optional"
assets = [
["target/release/proxy_manager", "usr/bin/", "755"],
["debian/proxy-manager.service", "/lib/systemd/system/proxy-manager.service", "644"],
["debian/config.toml", "/etc/proxy_manager/config.toml", "644"]
]
conf-files = ["/etc/proxy_manager/config.toml"]
maintainer-scripts = "debian/maintainer_scripts/"

+ 4
- 4
Jenkinsfile View File

@ -18,17 +18,17 @@ pipeline {
sh "cargo clippy --all-targets --all-features -- -D warnings"
}
}
/*stage('Build') {
stage('Build') {
steps {
sh "cargo install cargo-deb"
sh "cargo deb"
}
}*/
}
}
/*post {
post {
always {
archiveArtifacts artifacts: 'target/debian/*.deb', fingerprint: true
}
}*/
}
}

+ 9
- 0
debian/config.toml View File

@ -0,0 +1,9 @@
proxies = []
[websites]
# [websites.facebook]
# delay = 5 # number of seconds between requests, per proxy
# [websites.google]
# delay = 0 # no delay

+ 1
- 0
debian/maintainer_scripts/postinst View File

@ -0,0 +1 @@
adduser --system proxy-manager

+ 14
- 0
debian/proxy-manager.service View File

@ -0,0 +1,14 @@
[Unit]
Description=Proxy Manager
After=syslog.target network.target remote-fs.target nss-lookup.target
[Service]
PIDFile=/run/proxy-manager.pid
ExecStart=/usr/bin/proxy_manager
ExecReload=/bin/kill -s HUP $MAINPID
ExecStop=/bin/kill -s QUIT $MAINPID
PrivateTmp=true
User=proxy-manager
[Install]
WantedBy=multi-user.target

Loading…
Cancel
Save